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.
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
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.
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.

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.
- Set Output FileName (no extension) and Output Format (XLSX, XLS, PDF, or CSV)
- Set Number of files (e.g., 2 for File1 + File2)
- Map File1, File Name1; File2, File Name2; etc.
- Optionally set Worksheets To Merge1, Worksheets To Merge2 (or leave empty for all sheets)
- Set Sort Position1, Sort Position2 for merge order (1, 2, 3...)
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Output FileName | Required | Merged output filename, no extension. The extension is added based on Output Format. | mergefile32 |
| Output Format | Required | Output format for the merged file: XLSX, XLS, PDF, or CSV. | XLSX |
| Number of files | Required | Count of files to merge. Determines how many File, File Name, Sort Position, and Worksheets To Merge slots appear. | 2 |
| File1 | Required | First Excel file to merge, mapped from a previous step. Must provide full file content. | [2. File from Step 2] |
| File Name1 | Required | First file's filename, mapped from a previous step. | add_header_sample_file.xlsx |
| Sort Position1 | Conditional | Merge order for the first file. Lower numbers are merged earlier. | 1 |
| Worksheets To Merge1 | Conditional | Comma-separated sheet names to include from File1. Empty includes all sheets. | Sheet1, Sheet2 |
| File2 | Required | Second Excel file to merge, mapped from a previous step. | [2. File from Step 2] |
| File Name2 | Required | Second file's filename. | abc.xlsx |
| Sort Position2 | Conditional | Merge order for the second file. | 2 |
| Worksheets To Merge2 | Conditional | Comma-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.
API endpoint to download the merged file. Map this to the next step's file input.
api.pdf4me.com/Zapier/GetDocument?d=...Alternative download URL with the filename in the path.
api.pdf4me.com/Zapier/GetAltDocument/.../mergefile32.xlsx| Field | Type | What it contains |
|---|---|---|
Job Id | String | Unique identifier for the Zapier job execution. |
File Url | URL | API endpoint to download the merged file. |
Alternate File Url | URL | Alternate download URL with the filename in the path. |
File Name | String | Base filename without extension. |
File Extension | String | File extension of the returned file, e.g. .xlsx. |
Full File Name | String | Complete filename with extension. |
Document Id | String | Unique identifier for the processed document. |
File Size | Number | Size of the output file in bytes. |
Doc Text | String | Extracted text, typically empty for Excel operations. |
- JSON
- Zap Integration
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": ""
}
Use + to map File Url or Alternate File Url to the next step, Drive, Dropbox, Email, or another PDF4me Excel action.
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.
- A scheduled trigger fires on the first day of the month.
- PDF4me Merge Files maps each department's report to File1 through File10, setting Sort Position for each so they merge in a consistent order.
- The consolidated workbook is uploaded to a shared Drive folder for leadership.
- A weekly trigger retrieves sales reports from regional Dropbox folders.
- 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.
- The merged report is emailed to the sales VP.
- A quarterly trigger retrieves each month's Excel file from SharePoint.
- PDF4me Merge Files combines all three months with Output Format set to PDF and Sort Position set to chronological order.
- The unmodifiable PDF archive is uploaded to compliance storage.
Practical Tips
Cheat Sheet
| Field | Value |
|---|---|
| Action | Merge Files |
| Output FileName | mergefile32 |
| Output Format | XLSX |
| Number of files | 2 |
| File1 / File2 | [Mapped from previous steps] |
| Sort Position1 / 2 | 1 / 2 |
| Worksheets To Merge1 | Sheet1, Sheet2 (or empty for all) |
Common Questions
Related Actions
Same Task on Other Platforms
Industry Use Cases & Applications
- Finance & Accounting
- Sales & Marketing
- Human Resources
- Operations & Supply Chain
- 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
- Regional Sales Consolidation: merge regional sales reports into a national sales workbook with regional tabs
- Channel Performance: combine direct, partner, and online channel reports into an omnichannel workbook
- Campaign Aggregation: merge individual campaign results into a comprehensive marketing performance workbook
- Territory Reporting: consolidate territory manager reports into a regional VP reporting workbook
- Quarterly Business Review: merge monthly sales files into a quarterly review workbook for QBR meetings
- Payroll Consolidation: merge location or division payroll files into a master payroll workbook
- Benefits Enrollment: combine benefit election files from multiple periods into an annual enrollment workbook
- Headcount Reporting: merge departmental headcount files into a company-wide headcount report
- Training Records: consolidate training completion files by department into a master training log
- Performance Review: merge individual review files into a company-wide performance management workbook
- Multi-Site Operations: merge site operational reports into a corporate operations workbook
- Inventory Consolidation: combine warehouse inventory files into a master inventory workbook
- Production Aggregation: merge plant production reports into a manufacturing performance workbook
- Quality Reporting: consolidate QC inspection files from multiple lines into a quality dashboard workbook
- Logistics Consolidation: merge carrier performance files into a consolidated logistics reporting workbook