Merge Rows in Excel - Data Consolidation for Zapier
PDF4me Merge Rows in Excel cleans up messy datasets by intelligently consolidating duplicate rows. Whether you have multiple customer orders that need combining, product variations to aggregate, or category data to group, this action identifies duplicates based on key columns and merges their values automatically. It combines non-key column data with semicolon-separated formatting while removing duplicate values within merged cells—so you get clean, consolidated data without manual processing. Perfect for organizing order data, cleaning up customer records, or preparing category-level summaries.
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 powerful Excel row merging services.

Configuration at a Glance
The screenshot above shows merging rows in worksheets 1 and 3 using column 5 as the merge key, with File and File Name mapped from a previous step.
add_header_sample_file.xlsx
1,3
5
XLSX
Use the + button next to File and File Name to map from earlier Zap steps—e.g., Full File Name from a previous PDF4me Excel action. The Excel file must provide full content, not "Exists but not shown" references.
If you see "File: (Exists but not shown)" in the File field and get "File is Empty" errors, select the option that provides the full file content instead. See Zapier & Power Automate Tips for details.
Key Features
- Intelligent Row Grouping: Group duplicate rows based on Merge Key Columns
- Value Consolidation: Non-key columns merged with "; " separator
- Duplicate Detection: Automatically identify and consolidate duplicate records
- Multiple Worksheet Support: Worksheet Numbers (1,3,5)—comma-separated, 1-based
- Flexible Key Selection: Merge Key Columns—empty = all columns (exact duplicates only)
- Output Format: XLSX, XLS, XLSB, or CSV
Parameters
Complete list of parameters for the Merge Rows action. Parameter names match the Zapier configuration UI.
- Map File (Excel) and File Name from previous step
- Enter Worksheet Numbers (e.g., "1,3" for worksheets 1 and 3)
- Set Merge Key Columns (e.g., "5" or "1,2"—empty for exact duplicates only)
- Select Output Format (XLSX, XLS, XLSB, CSV)
Important: Parameters marked with an asterisk (***) are required. Both worksheet and column numbers use 1-based indexing (1 = first worksheet, 1 = column A).
| Parameter | Type | Description | Example |
|---|---|---|---|
| File*** | File | Excel File Content—map from previous step. Shows "File: (Exists but not shown)" when mapped | [2. File from Step 2] |
| File Name*** | String | Excel Filename—map from previous step (e.g., Full File Name) | add_header_sample_file.xlsx |
| Worksheet Numbers*** | String | Worksheets to process (1-based)—comma-separated. 1 = first worksheet | 1,3 |
| Merge Key Columns | String | Key columns for grouping (1-based)—comma-separated. 1 = A, 5 = E. Empty = exact duplicates only | 5 or 1,2 |
| Output Format | String | Output format—XLSX, XLS, XLSB, or CSV | XLSX |
Output
The PDF4me Merge Rows in Excel action returns the modified Excel file for use in subsequent Zap steps. The output format is common across PDF4me Excel file-returning actions in Zapier.
Key output fields (map these to your next step)
API endpoint to download the processed Excel file.
api.pdf4me.com/Zapier/GetDocument?d=...Alternative download URL with filename in path.
api.pdf4me.com/Zapier/GetAltDocument/.../add_header_sample_file.xlsxUse for naming or passing metadata to the next step.
Complete output structure
- Table
- JSON
- Zap Integration
| Parameter | Type | Description |
|---|---|---|
| Job Id | String | Unique identifier for the Zapier job execution |
| File Url | URL | API endpoint to download the processed Excel file |
| Alternate File Url | URL | Alternate download URL with filename in path |
| File Name | String | Base filename without extension |
| File Extension | String | File extension |
| 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) |
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/.../add_header_sample_file.xlsx",
"File Name": "add_header_sample_file",
"File Extension": ".xlsx",
"Full File Name": "add_header_sample_file.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 Rows, Add Rows, Delete Rows, and other PDF4me Excel actions that return a file. The URLs are temporary—use them in the next step before they expire.
Scenario Examples
The PDF4me Merge Rows in Excel action in Zapier provides comprehensive scenario templates designed for real-world data consolidation needs:
- Customer Consolidation
- Duplicate Removal
- Category Aggregation
Automated Customer Order Consolidation Workflow
Consolidate multiple order rows per customer into single customer records:
Complete Scenario Steps:
- Trigger: Daily order consolidation scheduled at midnight
- Get Order Export: Retrieve daily orders Excel from e-commerce system
- Merge Rows: Map File, File Name; set Worksheet Numbers = "1", Merge Key Columns = "1" (CustomerID column)
- Consolidate Orders: Non-key columns (OrderID, Product, Amount) merged with "; "
- Set Output Format: OutputFormat = "XLSX" for further processing
- Remove Duplicate Values: Automatic deduplication in merged cells
- Upload Result: Map File Url from output to Google Drive customer data folder
- Email Customer Service: Send consolidated view to customer service team
- Archive Source: Move original order export to archive folder
- Log Consolidation: Record consolidation event with row count reduction
Business Benefits:
- Consolidates 1000+ order rows into 200 customer records daily
- Customer service sees all orders per customer in single row
- Reduces report row count by 80% improving readability
- Eliminates manual customer order grouping saving 3 hours daily
Automated Exact Duplicate Row Removal Workflow
Remove completely identical rows from data exports automatically:
Complete Scenario Steps:
- Trigger: New data file uploaded to Dropbox import folder
- Get Data File: Retrieve uploaded Excel with potential duplicates
- Merge Rows: Map File, File Name; set Merge Key Columns = "" (empty for exact duplicates only)
- Process All Sheets: Set Worksheet Numbers to include all data worksheets
- Keep First Occurrence: First instance of duplicate kept, rest removed
- Set XLSX Output: OutputFormat = "XLSX" maintains formatting
- Upload Result: Map File Url from output to Dropbox clean folder
- Generate Report: Create summary showing duplicate count removed
- Email Data Team: Send deduplication report to data quality team
- Archive Original: Store original file with duplicates in archive
Business Benefits:
- Removes 500+ exact duplicate rows weekly automatically
- Improves downstream system data quality by 100%
- Prevents duplicate record processing errors
- Eliminates manual duplicate detection saving 2 hours weekly
Automated Product Category Aggregation Workflow
Roll up product data to category level by merging category rows:
Complete Scenario Steps:
- Trigger: Weekly category rollup scheduled every Sunday at 11 PM
- Get Product Data: Retrieve product sales Excel from SharePoint
- Merge Rows: Map File, File Name; set Merge Key Columns = "1,2" (Category, Subcategory)
- Aggregate Products: Product names and SKUs merged with "; "
- Process Sales Sheet: Set Worksheet Numbers = "1" for sales data sheet
- Consolidate Values: Sales amounts combined showing all products per category
- Set CSV Output: OutputFormat = "CSV" for database import
- Upload Result: Map File Url from output to database import folder
- Email Marketing: Send category performance summary to marketing team
- Log Aggregation: Record aggregation with category count
Business Benefits:
- Aggregates 5000+ product rows into 200 categories weekly
- Category managers see all products in category consolidated
- Reduces category report complexity by 95%
- Enables category-level analysis and planning
Industry Use Cases & Applications
- Sales & E‑Commerce
- Finance & Accounting
- Human Resources
- Operations
- Customer Order Consolidation: Merge multiple order rows per customer into single record showing all orders
- Product SKU Aggregation: Consolidate product variants by parent SKU grouping all variants together
- Account Rollup: Merge account activity rows by account ID combining all transactions
- Territory Consolidation: Group sales data by territory merging all rep activities per territory
- Channel Aggregation: Consolidate sales by channel (direct, partner, online) showing all products per channel
- GL Account Consolidation: Merge transaction rows by GL account combining all entries
- Vendor Rollup: Consolidate invoice rows by vendor ID showing all invoices per vendor
- Cost Center Aggregation: Group expenses by cost center merging all expense types
- Project Consolidation: Merge project cost rows by project ID combining labor, materials, expenses
- Department Rollup: Consolidate budget/actual rows by department showing all accounts
- Employee Timesheet Consolidation: Merge timesheet rows by employee ID combining all time entries
- Training Record Aggregation: Group training records by employee showing all courses completed
- Department Headcount Rollup: Consolidate employee rows by department combining all employees
- Benefits Enrollment Consolidation: Merge benefit selection rows by employee combining all elections
- Performance Record Aggregation: Group review data by employee merging all rating categories
- Inventory Location Consolidation: Merge stock rows by SKU combining quantities across locations
- Equipment Maintenance Rollup: Group maintenance records by asset ID showing all service events
- Quality Inspection Aggregation: Consolidate QC rows by batch number combining all inspection results
- Production Run Consolidation: Merge production rows by work order combining all operations
- Supplier Performance Rollup: Group supplier data by supplier ID merging delivery and quality metrics