Skip to main content

Merge Excel Files in Zapier

PDF4me Merge Files is a Zapier action that combines two or more Excel workbooks into a single file, automatically renaming duplicate worksheet names so no data is overwritten. Use it to consolidate monthly department reports, aggregate regional data, or assemble multi-file datasets. Choose which sheets to include from each file and output as XLSX, XLS, PDF, or CSV.

What this action does

Takes two or more Excel workbooks from previous Zap steps and combines them into a single output file. Set Number of files to match how many workbooks you are merging, then map each File and File Name pair. Worksheets To Merge lets you include only specific sheets per file, and Sort Position controls the order files are merged in, independent of which File slot each one is mapped to. Output as XLSX, XLS, PDF, or CSV.

Related Blog Posts
No blog post yet for this feature — coming soon.
In the meantime, browse the PDF4me blog for tutorials and workflows across every platform.
Visit the blog

Authenticating Your API Request

To access the PDF4me Web API through Zapier, every request must include proper authentication credentials. Authentication ensures secure communication and validates your identity as an authorized user, enabling seamless integration between your Zapier workflows and PDF4me's Excel file merging services.

Important Facts You Should Not Miss

Number of files controls how many slots appear
Set Number of files first. Zapier then shows a File, File Name, Sort Position, and Worksheets To Merge slot for each file, numbered 1 through your count.
Duplicate worksheet names are renamed automatically
A sheet named Summary in two source files becomes Summary_1 and Summary_2 in the merged workbook, no data is lost or overwritten.
Sort Position, not mapping order, sets merge order
Lower Sort Position values are merged earlier. This is independent of which File slot a workbook happens to be mapped into.
Map File1, File2, etc. from previous steps

Use the + button next to File1, File2, and corresponding File Name1, File Name2 fields to map from earlier Zap steps. Set Number of files to match how many files you are merging. Each file must provide full content.

File: (Exists but not shown)

If you see "File: (Exists but not shown)" and get errors, select the option that provides the full file content instead. See Zapier & Power Automate Tips for details.

PDF4me Excel Merge Multiple Files Zapier configuration - Output FileName, Output Format, Number of files, File1/File2, Worksheets To Merge
Output FileName, Output Format, and Number of files carry an asterisk, along with File and File Name for each file slot. Sort Position and Worksheets To Merge are optional.

What Are the Key Features of Merge Files?

  • Multiple File Merging: combine 2 or more Excel files into one workbook (Number of files)
  • Selective Worksheets: Worksheets To Merge1, Worksheets To Merge2, choose sheets per file or leave empty for all
  • Sort Control: Sort Position1, Sort Position2, lower numbers merged first
  • Output Format: XLSX, XLS, PDF, or CSV
  • Duplicate Name Handling: duplicate worksheet names automatically renamed with suffixes

Parameters

Complete list of parameters for the Merge Files action. Parameter names match the Zapier configuration UI shown in the screenshot above. The UI shows File1, File2, etc., one set per file based on Number of files.

Quick setup checklist
  1. Set Output FileName (no extension) and Output Format (XLSX, XLS, PDF, or CSV)
  2. Set Number of files (e.g., 2 for File1 + File2)
  3. Map File1, File Name1; File2, File Name2; etc.
  4. Optionally set Worksheets To Merge1, Worksheets To Merge2 (or leave empty for all sheets)
  5. Set Sort Position1, Sort Position2 for merge order (1, 2, 3...)
ParameterRequiredWhat it doesExample
Output FileNameRequiredMerged output filename, no extension. The extension is added based on Output Format.mergefile32
Output FormatRequiredOutput format for the merged file: XLSX, XLS, PDF, or CSV.XLSX
Number of filesRequiredCount of files to merge. Determines how many File, File Name, Sort Position, and Worksheets To Merge slots appear.2
File1RequiredFirst Excel file to merge, mapped from a previous step. Must provide full file content.[2. File from Step 2]
File Name1RequiredFirst file's filename, mapped from a previous step.add_header_sample_file.xlsx
Sort Position1ConditionalMerge order for the first file. Lower numbers are merged earlier.1
Worksheets To Merge1ConditionalComma-separated sheet names to include from File1. Empty includes all sheets.Sheet1, Sheet2
File2RequiredSecond Excel file to merge, mapped from a previous step.[2. File from Step 2]
File Name2RequiredSecond file's filename.abc.xlsx
Sort Position2ConditionalMerge order for the second file.2
Worksheets To Merge2ConditionalComma-separated sheet names to include from File2. Empty includes all sheets.Sheet5
Merging more than 2 files

Set Number of files to 3, 4, etc. Zapier will show File3, File Name3, Sort Position3, Worksheets To Merge3, and so on. Map each file and set sort positions for merge order.

Important: Only File and File Name for each file, plus Output FileName, Output Format, and Number of files, are required. Duplicate worksheet names are automatically renamed (e.g., Summary_1, Summary_2).

What Does Merge Files Return?

The PDF4me Merge Files action returns the merged Excel file for use in subsequent Zap steps. The output format is common across all PDF4me Excel actions in Zapier.

File Url

API endpoint to download the merged file. Map this to the next step's file input.

api.pdf4me.com/Zapier/GetDocument?d=...
Alternate File Url

Alternative download URL with the filename in the path.

api.pdf4me.com/Zapier/GetAltDocument/.../mergefile32.xlsx
FieldTypeWhat it contains
Job IdStringUnique identifier for the Zapier job execution.
File UrlURLAPI endpoint to download the merged file.
Alternate File UrlURLAlternate download URL with the filename in the path.
File NameStringBase filename without extension.
File ExtensionStringFile extension of the returned file, e.g. .xlsx.
Full File NameStringComplete filename with extension.
Document IdStringUnique identifier for the processed document.
File SizeNumberSize of the output file in bytes.
Doc TextStringExtracted text, typically empty for Excel operations.

Example JSON output (URLs show format only, not working links):

{
"Job Id": "969f2da3-f10a-49bf-b084-6fc4759991ec",
"File Url": "api.pdf4me.com/Zapier/GetDocument?d=...",
"Alternate File Url": "api.pdf4me.com/Zapier/GetAltDocument/.../mergefile32.xlsx",
"File Name": "mergefile32",
"File Extension": ".xlsx",
"Full File Name": "mergefile32.xlsx",
"Document Id": "07386627-184a-44b2-a040-5ea2712a4bc5",
"File Size": 212764,
"Doc Text": ""
}
Same output for all PDF4me Excel actions

This output structure is shared across Merge Files, Add Rows, Delete Rows, and other PDF4me Excel actions in Zapier. The URLs are temporary, use them in the next step before they expire.

Typical Setups

Workflow ExamplesCommon Zapier workflow patterns using Merge Files.
Monthly department consolidation
  1. A scheduled trigger fires on the first day of the month.
  2. PDF4me Merge Files maps each department's report to File1 through File10, setting Sort Position for each so they merge in a consistent order.
  3. The consolidated workbook is uploaded to a shared Drive folder for leadership.
Regional data aggregation
  1. A weekly trigger retrieves sales reports from regional Dropbox folders.
  2. PDF4me Merge Files sets Worksheets To Merge for each file to include only the Summary and Details sheets, keeping other tabs out of the consolidated file.
  3. The merged report is emailed to the sales VP.
Quarterly PDF archive
  1. A quarterly trigger retrieves each month's Excel file from SharePoint.
  2. PDF4me Merge Files combines all three months with Output Format set to PDF and Sort Position set to chronological order.
  3. The unmodifiable PDF archive is uploaded to compliance storage.

Practical Tips

File: (Exists but not shown) causes errors
Select the mapping option that provides the file's full binary content instead of a reference. See Zapier & Power Automate Tips for the exact steps.
Set Number of files before mapping
Zapier only shows File3, File Name3, and so on after Number of files is set high enough. Set it first, then map each slot.
Use Sort Position, not mapping order, for sequence
Files merge in Sort Position order, not the order you happened to map them into File1, File2, etc.
Duplicate sheet names are handled automatically
A repeated sheet name like Summary is renamed with a numeric suffix in the output, you do not need to rename sheets before merging.
Choose PDF or CSV output deliberately
PDF produces an unmodifiable archive copy that loses live formulas. CSV flattens to a single sheet of data. Pick XLSX or XLS if the merged file still needs to be editable with multiple sheets.

Cheat Sheet

FieldValue
ActionMerge Files
Output FileNamemergefile32
Output FormatXLSX
Number of files2
File1 / File2[Mapped from previous steps]
Sort Position1 / 21 / 2
Worksheets To Merge1Sheet1, Sheet2 (or empty for all)

Common Questions

How do I merge more than 2 Excel files in Zapier?+
Set Number of files to the total count. Zapier then shows File3, File Name3, Sort Position3, and Worksheets To Merge3, and so on for each additional file. See Microsoft's guide to combining data from multiple sheets for how the native Excel feature compares.
What happens to worksheets with the same name when merging?+
Duplicate worksheet names are automatically renamed with a numeric suffix, for example Summary becomes Summary_1 and Summary_2, so no data is overwritten during the merge.
Can I merge only specific worksheets from each file?+
Yes. Set Worksheets To Merge1, Worksheets To Merge2, and so on to a comma-separated list of sheet names for that file. Leave the field empty to include every worksheet from that file.
What output formats are supported when merging Excel files?+
XLSX, XLS, PDF, or CSV. Choose PDF for an unmodifiable archive copy, or CSV when the destination app only needs the flattened data.
Does the order I map files control the order in the merged workbook?+
No, Sort Position does. Set Sort Position1, Sort Position2, and so on to whole numbers, lower numbers are merged earlier, regardless of which File slot each workbook is mapped to. See Ablebits' overview of merging multiple Excel files for how manual merge order works by comparison.

Same Task on Other Platforms

Industry Use Cases & Applications

  • Period Consolidation: merge monthly P&L, balance sheet, and cash flow files into a quarterly workbook
  • Entity Rollup: combine subsidiary financial statements into a consolidated reporting workbook
  • Budget Aggregation: merge departmental budget files into a master company budget workbook
  • Audit File Assembly: consolidate working paper files from multiple audit areas into an audit file
  • Variance Reporting: merge actual results with budget or forecast files for a variance analysis workbook

Get Help