Delete Rows from Excel - Cleanup for Zapier
PDF4me Delete Rows from Excel simplifies spreadsheet cleanup with flexible deletion capabilities. Remove single rows, ranges, or complex combinations—all using intuitive syntax like "1-5,10,15-20". The action processes deletions from bottom to top automatically, preventing the index-shifting errors that break formulas when rows are removed in the wrong order. Perfect for cleaning up test data, removing obsolete entries, or preparing templates by eliminating sample rows.
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 row deletion services.

Configuration at a Glance
The screenshot above shows a typical setup: deleting rows 1–20 from Sheet5 in an Excel file, with File and File Name mapped from a previous step.
add_header_sample_file.xlsx
Sheet5
1-20
:::tip Map File and File Name from previous steps Use the + button next to File and File Name to map from earlier Zap steps—e.g., Excel from Google Drive. You can combine File Name and File Ext from a previous step. The Excel file must provide full content, not "Exists but not shown" references. :::
:::warning File: (Exists but not shown) 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
- Flexible Range Syntax: Single rows (e.g., "5,10,15"), ranges ("1-20"), or mixed ("1-5,10,15-20")
- Safe Deletion Order: Bottom-to-top processing prevents index shifting
- Worksheet Targeting: Specify worksheet by exact name (required)
- 1-Based Indexing: Row 1 is the first row
Parameters
Complete list of parameters for the Delete Rows action. Parameter names match the Zapier configuration UI.
- Map File (Excel) from your trigger or a previous step
- Map File Name (e.g., File Name + File Ext from previous step)
- Enter Worksheet Name (exact name of sheet to delete rows from)
- Enter Row Ranges (e.g., "1-20", "5,10,15", or "1-5,10,15-20")
Important: Parameters marked with an asterisk (***) are required. Use the + button next to each field to map data from previous steps. Rows are processed bottom-to-top to avoid index shifting. Row numbers are 1-based.
| Parameter | Type | Description | Example |
|---|---|---|---|
| File*** | File | Excel File Content • Labeled "File" in Zapier—map from previous step • Source from Dropbox, Google Drive, HTTP request • Binary Excel file to delete rows from • Shows "File: (Exists but not shown)" when mapped—ensure full file content is passed | [2. File from Step 2] |
| File Name*** | String | Excel Filename • Specify filename with .xlsx or .xls extension • Map from previous step (e.g., File Name + File Ext) • Used for output file identification | add_header_sample_file.xlsx |
| Worksheet Name*** | String | Target Worksheet • Exact name of worksheet to delete rows from • Required—must match worksheet name exactly (case-sensitive) | Sheet5 |
| Row Ranges*** | String | Deletion Range Specification • Comma-separated list of row numbers and ranges • Single rows: "5,10,15" deletes rows 5, 10, and 15 • Ranges: "1-20" deletes rows 1 through 20 inclusive • Mixed: "1-5,10,15-20" combines ranges and singles • 1-based indexing: Row 1 is the first row • Processed bottom-to-top automatically | 1-20 |
Row range syntax examples
Single rows: "5,10,15" — deletes rows 5, 10, and 15
Range: "1-20" — deletes rows 1 through 20
Mixed: "1-3,25" — deletes rows 1–3 and row 25 (e.g., internal notes + calculation row)
Output
The PDF4me Delete Rows from Excel action returns the modified Excel file for use in subsequent Zap steps. The output format is common across all PDF4me Excel actions in Zapier—use the fields below to map results to your next step.
Key output fields (map these to your next step)
API endpoint to download the processed Excel file. Map this to the next step's file input (e.g., Google Drive, Dropbox, or another PDF4me Excel action).
Generated URLs follow this format (example—not a working link):
api.pdf4me.com/Zapier/GetDocument?d=...Alternative download URL with the filename in the path. Use when the receiving app expects a human-readable filename in the URL.
Generated URLs follow this format (example—not a working link):
api.pdf4me.com/Zapier/GetAltDocument/.../add_header_sample_file.xlsxUse for naming the saved file or passing metadata to the next step. Values match your input filename.
Complete output structure
- Table
- JSON
- Zap Integration
All output fields (Zapier Test/Output panel)
| 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 (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) |
Example JSON output
The action generates unique URLs when it runs. The values below show the structure—actual URLs will be different and valid for your job only:
{
"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": ""
}
Map File Url or Alternate File Url to the next step's file input for uploads or chained Excel operations.
Using output in subsequent steps
Use the + button to map output fields:
- File Url → Primary choice for file input (Drive, Dropbox, Email attachments, next PDF4me action)
- Alternate File Url → Use when the app expects filename in the URL
- Full File Name → Use when the next step needs the filename for saving or display
Common downstream actions:
- Upload to Google Drive, Dropbox, or OneDrive
- Attach to email via Gmail, Outlook
- Chain to Update Rows, Add Watermark, or other PDF4me Excel actions
:::info Same output for all PDF4me Excel actions This output structure is shared across Delete Rows, Add Rows, Update Rows, and other PDF4me Excel actions in Zapier. The URLs are temporary—use them in the next step before they expire. :::
Scenario Examples
The PDF4me Delete Rows from Excel action in Zapier provides comprehensive scenario templates designed for real-world data cleanup needs:
- Report Cleanup
- Data Archival
- Template Cleanup
Automated Report Row Cleanup Workflow
Prepare client-ready reports by removing internal rows automatically:
Complete Scenario Steps:
- Trigger: Weekly report generation completion event
- Get Internal Report: Retrieve full report with notes from Google Drive
- Delete Rows: Map File, File Name; set Worksheet Name = "Report", Row Ranges = "1-3,25"
- Internal Rows Removed: Rows 1-3 (title/internal notes), row 25 (calculation notes)—processed bottom-to-top
- Upload Clean Report: Map File Url from output to Google Drive client folder
- Email Client: Send notification with clean report download link
- Archive Original: Store full internal version in archive folder
- Log Cleanup: Record cleanup event with timestamp and row counts
Business Benefits:
- Cleans 52 weekly reports automatically per year
- Removes internal notes and calculations before client distribution
- Bottom-to-top processing prevents row number shifting errors
- Eliminates manual row deletion saving 10 minutes per report
Automated Data Retention Cleanup Workflow
Maintain data retention policies by deleting outdated rows automatically:
Complete Scenario Steps:
- Trigger: Monthly data retention cleanup scheduled on first of month
- Get Master Log: Retrieve transaction log Excel from SharePoint
- Identify Old Rows: Query which row numbers contain data older than 24 months
- Delete Rows: Map File, File Name; set Worksheet Name = "Transactions", Row Ranges = "5-150" (or build dynamically)
- Preserve Headers: Ensure row 1 (headers) not included in deletion range
- Upload Updated Log: Map File Url from output to SharePoint
- Archive Deleted Data: Store deleted rows in separate archive (pre-deletion step if needed)
- Email Compliance: Send retention cleanup report to compliance officer
- Update Retention Log: Record cleanup event in retention audit log
Business Benefits:
- Maintains data retention policy compliance automatically
- Deletes 2000+ outdated transaction rows monthly
- Reduces file size and improves performance
- Eliminates manual retention cleanup saving 2 hours monthly
Automated Template Sample Row Removal Workflow
Prepare distribution-ready templates by removing sample data automatically:
Complete Scenario Steps:
- Trigger: Template marked ready for distribution in content management
- Get Master Template: Retrieve template with sample rows from template library
- Delete Rows: Map File, File Name; set Worksheet Name = "Sheet1", Row Ranges = "2-10"
- Sample Rows Removed: Rows 2-10 (sample/example data); headers (row 1) and formulas preserved
- Repeat for Other Sheets: Run Delete Rows again for each worksheet if needed (Worksheet Name = "Sheet2", etc.)
- Upload Clean Template: Map File Url from output to public folder
- Email Users: Notify team of new clean template availability
- Archive Sample Version: Store template with samples in archive
- Update Template Registry: Mark template as distributed in registry
Business Benefits:
- Prepares 20+ templates monthly for distribution automatically
- Removes sample data preventing user confusion
- Preserves formulas and formatting while cleaning
- Saves 15 minutes per template in manual cleanup
Industry Use Cases & Applications
- Finance & Accounting
- Sales & Marketing
- Human Resources
- Operations
- Client Report Cleanup: Remove internal note rows (1-3) and calculation rows before external distribution
- Data Retention Compliance: Delete transaction rows older than 7 years per retention policy
- Audit Trail Trimming: Remove test/sample entries from audit logs before archival
- Budget Template Preparation: Delete previous year's data rows from budget templates for new cycle
- Reconciliation Cleanup: Remove resolved discrepancy rows from monthly reconciliation workbooks
- Campaign Result Cleanup: Delete test campaign rows before final performance reporting
- CRM Export Trimming: Remove inactive/deleted lead rows from CRM exports
- Pricing Sheet Updates: Delete outdated product rows from pricing sheets for clients
- Sales Report Finalization: Remove internal calculation rows before management distribution
- Forecast Cleanup: Delete historical forecast rows beyond 12-month rolling window
- Template Sample Removal: Delete example employee rows from HR templates before distribution
- Terminated Employee Cleanup: Remove separated employee rows from active roster spreadsheets
- Training Log Trimming: Delete completed training session rows older than 3 years
- Payroll Archive Preparation: Remove test payroll rows before quarterly payroll archival
- Benefits Enrollment Cleanup: Delete previous year's enrollment rows from new enrollment templates
- Production Log Retention: Delete production run rows older than retention period
- Equipment Log Trimming: Remove old maintenance event rows from equipment logs
- Quality Control Cleanup: Delete test/calibration rows from QC inspection logs
- Inventory History Trimming: Remove transaction rows older than 24 months from inventory logs
- Shift Report Finalization: Delete internal supervisor note rows before operations review distribution