Delete rows from Excel worksheet using n8n action
PDF4me Delete Rows lets you strip out unwanted rows (headers, blank lines, outdated sections) directly from n8n. Provide a comma-separated list of 1-based row numbers or ranges, optionally target a worksheet, and PDF4me deletes from the bottom up to avoid shifting issues. Ideal for sanitizing exports before sharing or preparing templates for end users.
Setup
Add the PDF4me “Delete Rows” node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.
Prerequisites
- PDF4me API credentials
- n8n workflow access
Configuration
- Add the PDF4me node to the workflow
- Select the "Delete rows from Excel worksheet" action
- Supply the workbook source and range string

Parameters
Important: Parameters marked with an asterisk (***) are required. Row numbers in the range string are 1-based.
| Parameter | Type | Description | Example |
|---|---|---|---|
| Input Data Type*** | String | Workbook source selector (Binary Data, Base64 String, URL). | Binary Data |
| Input Binary Field*** | Binary | Required when using Binary Data. | {{ $binary.data }} |
| Base64 Document Content*** | String | Required when using Base64 String. | UEsDBBQAAAA... |
| Document URL*** | String | Required when using URL. Public HTTPS link to the workbook. | https://files.example.com/report.xlsx |
| File Name*** | String | Logical filename (with extension) for tracking. | operations.xlsx |
| Row Ranges*** | String | Row range string. Accepts single rows (5), ranges (10-20), or mixed (1-3,8,15-18). Rows deleted bottom-to-top. | 1-3,10,25-30 |
| Worksheet Name | String | Worksheet to clean. Empty = first sheet. | Summary |
| Binary Data Output Name*** | String | Binary slot that will hold the cleaned workbook. | document |
Output
Output Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| fileName | String | Excel document filename with rows deleted - The name of the output Excel document file after row deletion | excel_rows_deleted.xlsx |
| fileSize | Number | File size in bytes - The size of the Excel document in bytes after row deletion | 212997 |
| success | Boolean | PDF4me operation status - Boolean flag indicating the success or failure of the row deletion process. PDF4me returns true for successful operations and false for any errors | true |
| originalFileName | String | Original Excel document filename - The name of the input Excel document file | myExcelFile.xlsx |
| worksheetName | String | Worksheet name - The name of the worksheet where rows were deleted | sheet2 |
| rowRanges | String | Row ranges deleted - The row range string that was used for deletion (e.g., "10-20", "1-3,8,15-18") | 10-20 |
| message | String | Operation message - Descriptive message indicating the result of the row deletion operation, including the row ranges and worksheet name | Successfully deleted rows 10-20 from worksheet 'sheet2' |
N8N Action Response
The PDF4me Delete rows from Excel worksheet API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:
- JSON
- Table
- Schema
- Binary
JSON Response Format
The raw JSON response from the API:
[
{
"fileName": "excel_rows_deleted.xlsx",
"fileSize": 212997,
"success": true,
"originalFileName": "myExcelFile.xlsx",
"worksheetName": "sheet2",
"rowRanges": "10-20",
"message": "Successfully deleted rows 10-20 from worksheet 'sheet2'"
}
]
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| fileName | excel_rows_deleted.xlsx |
| fileSize | 212997 |
| success | true |
| originalFileName | myExcelFile.xlsx |
| worksheetName | sheet2 |
| rowRanges | 10-20 |
| message | Successfully deleted rows 10-20 from worksheet 'sheet2' |
Schema View
The data structure and types of the response:
1 item
fileName: T excel_rows_deleted.xlsx
fileSize: # 212997
success: ☑ true
originalFileName: T myExcelFile.xlsx
worksheetName: T sheet2
rowRanges: T 10-20
message: T Successfully deleted rows 10-20 from worksheet 'sheet2'
Type Indicators:
T= String (Text)#= Number☑= Boolean[]= Array
Binary Data View
The actual Excel document file data and metadata:
data
─────────────────────────────
File Name: excel_rows_deleted.xlsx
File Extension: xlsx
Mime Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
File Size: 213 kB
Binary Data Access:
- n8n Binary Object:
$binary.data.data - Base64 Content: Available for direct use
- File Operations: Ready for download, email, or storage
Use Cases
- Report cleanup: Remove internal notes, totals, or blank separators before sending to clients.
- Template preparation: Strip example rows from Excel templates prior to onboarding new users.
- Compliance workflows: Drop expired records or retention-exceeded rows automatically.