Extract rows from Excel worksheet using n8n action
PDF4me Extract Rows converts any worksheet slice into ready-to-use JSON within n8n. Specify 0-based row/column ranges, decide if the first row should become headers, skip hidden or empty rows, and choose whether values remain typed (numbers, booleans, ISO dates) or forced to text. Ideal for piping Excel data into APIs, databases, or additional PDF4me actions.
Setup
Add the PDF4me “Extract 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 "Extract rows from Excel worksheet" action
- Provide the Excel source and extraction window

Parameters
Important: Parameters marked with an asterisk (***) are required. Row/column indexes are 0-based (Row 0 = Excel row 1).
| Parameter | Type | Description | Example |
|---|---|---|---|
| Input Data Type*** | String | Excel source selector (Binary Data, Base64 String, URL). | Binary Data |
| Input Binary Field*** | Binary | Required when Binary Data is selected. | {{ $binary.data }} |
| Base64 Document Content*** | String | Required when Base64 String is selected. | UEsDBBQAAAA... |
| Document URL*** | String | Required when URL is selected. Public file link. | https://files.example.com/report.xlsx |
| File Name*** | String | Logical workbook name with extension. | analytics.xlsx |
| Worksheet Name | String | Worksheet to read. Empty = first sheet. | Summary |
| First Row*** | Number | 0-based starting row for extraction. | 0 |
| Last Row | Number | 0-based ending row. Use -1 to read to the last data row. | -1 |
| First Column | Number | 0-based starting column (0 = column A). | 0 |
| Last Column | Number | 0-based ending column. Use -1 for last data column. | -1 |
| Has Header Row | Boolean | true uses First Row as column headers and excludes it from data. | true |
| Exclude Hidden Rows | Boolean | Skip rows that are hidden in Excel. | false |
| Exclude Hidden Columns | Boolean | Skip hidden columns. | false |
| Exclude Empty Rows | Boolean | Remove rows where all cells are empty. | true |
| Export Empty Cells | Boolean | Include empty cells with empty-string values instead of omitting them. | false |
| Export Values As Text | Boolean | Force all values to strings. false preserves native types. | false |
| Binary Data Output Name*** | String | Binary slot storing serialized JSON (PDF4me returns JSON bytes). | document |
Output
Output Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| success | Boolean | PDF4me operation status - Boolean flag indicating the success or failure of the row extraction 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 from which rows were extracted | First Worksheet |
| hasHeaderRow | Boolean | Header row status - Indicates whether the first row was treated as headers. true if headers were used, false otherwise | true |
| firstRow | Number | First row index (0-based) - The 0-based index of the first row extracted | 0 |
| lastRow | Number | Last row index (0-based) - The 0-based index of the last row extracted. -1 indicates extraction to the last data row | 2 |
| firstColumn | Number | First column index (0-based) - The 0-based index of the first column extracted (0 = column A) | 0 |
| lastColumn | Number | Last column index (0-based) - The 0-based index of the last column extracted. -1 indicates extraction to the last data column | -1 |
| excludeEmptyRows | Boolean | Empty row exclusion - Indicates whether empty rows were excluded. true if excluded, false if included | true |
| excludeHiddenRows | Boolean | Hidden row exclusion - Indicates whether hidden rows were excluded. true if excluded, false if included | true |
| excludeHiddenColumns | Boolean | Hidden column exclusion - Indicates whether hidden columns were excluded. true if excluded, false if included | true |
| exportValuesAsText | Boolean | Text export mode - Indicates whether values were exported as text. true if forced to strings, false if native types preserved | false |
| exportEmptyCells | Boolean | Empty cell export - Indicates whether empty cells were exported. true if included with empty strings, false if omitted | false |
| exportAsObject | Boolean | Object export mode - Indicates whether data was exported as object format | false |
| hyperlinkFormat | String | Hyperlink format - Format used for hyperlinks in extracted data. Values: "Text", "Url", etc. | Text |
| culture | String | Culture/Locale code - Culture code used for data extraction (e.g., "en-US", "de-DE", "fr-FR") | en-US |
| rowsExtracted | Number | Number of rows extracted - The total count of rows that were successfully extracted | 1 |
| extractedData | Object | Extracted data object - Nested object containing the extracted row data with rowData array | {"rowData": [{"Column1": 1, "First Name": "Dulce"}]} |
| message | String | Operation message - Descriptive message indicating the result of the row extraction operation, including the number of rows extracted and worksheet name | Successfully extracted 1 row(s) from worksheet 'First Worksheet' |
N8N Action Response
The PDF4me Extract 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:
[
{
"success": true,
"originalFileName": "myExcelFile.xlsx",
"worksheetName": "First Worksheet",
"hasHeaderRow": true,
"firstRow": 0,
"lastRow": 2,
"firstColumn": 0,
"lastColumn": -1,
"excludeEmptyRows": true,
"excludeHiddenRows": true,
"excludeHiddenColumns": true,
"exportValuesAsText": false,
"exportEmptyCells": false,
"exportAsObject": false,
"hyperlinkFormat": "Text",
"culture": "en-US",
"rowsExtracted": 1,
"extractedData": {
"document": null,
"fileName": null,
"success": true,
"errorMessage": null,
"rowData": [
{
"Column1": 1,
"First Name": "Dulce",
"Last Name": "Abril",
"Gender": "Female",
"Country": "United States",
"Age": 32,
"Date": "15/10/2017",
"Id": 1562
},
{
"Column1": 2,
"First Name": "Mara",
"Last Name": "Hashimoto",
"Gender": "Female",
"Country": "Great Britain",
"Age": 25,
"Date": "16/08/2016",
"Id": 1582
}
]
},
"message": "Successfully extracted 1 row(s) from worksheet 'First Worksheet'"
}
]
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| success | true |
| originalFileName | myExcelFile.xlsx |
| worksheetName | First Worksheet |
| hasHeaderRow | true |
| firstRow | 0 |
| lastRow | 2 |
| firstColumn | 0 |
| lastColumn | -1 |
| excludeEmptyRows | true |
| excludeHiddenRows | true |
| excludeHiddenColumns | true |
| exportValuesAsText | false |
| exportEmptyCells | false |
| exportAsObject | false |
| hyperlinkFormat | Text |
| culture | en-US |
| rowsExtracted | 1 |
| extractedData | Object containing rowData array |
| message | Successfully extracted 1 row(s) from worksheet 'First Worksheet' |
Extracted Data Object:
| Parameter | Value |
|---|---|
| document | null |
| fileName | null |
| success | true |
| errorMessage | null |
| rowData | Array of extracted row objects |
Note: rowData contains the extracted row objects as an array with column headers as keys.
Schema View
The data structure and types of the response:
1 item
success: ☑ true
originalFileName: T myExcelFile.xlsx
worksheetName: T First Worksheet
hasHeaderRow: ☑ true
firstRow: # 0
lastRow: # 2
firstColumn: # 0
lastColumn: # -1
excludeEmptyRows: ☑ true
excludeHiddenRows: ☑ true
excludeHiddenColumns: ☑ true
exportValuesAsText: ☑ false
exportEmptyCells: ☑ false
exportAsObject: ☑ false
hyperlinkFormat: T Text
culture: T en-US
rowsExtracted: # 1
extractedData: {} Object
document: null
fileName: null
success: ☑ true
errorMessage: null
rowData: [] Array
[0]: {} Object
Column1: # 1
First Name: T Dulce
Last Name: T Abril
Gender: T Female
Country: T United States
Age: # 32
Date: T 15/10/2017
Id: # 1562
[1]: {} Object
Column1: # 2
First Name: T Mara
Last Name: T Hashimoto
Gender: T Female
Country: T Great Britain
Age: # 25
Date: T 16/08/2016
Id: # 1582
message: T Successfully extracted 1 row(s) from worksheet 'First Worksheet'
Type Indicators:
T= String (Text)#= Number☑= Boolean[]= Array{}= Objectnull= Null value
Binary Data View
The extracted data is returned as JSON in the response. Access the row data directly from the extractedData.rowData array:
extractedData
─────────────────────────────
rowData: Array of row objects
success: true
errorMessage: null
Data Access:
- Row Data Array:
$json.extractedData.rowData - Individual Rows:
$json.extractedData.rowData[0] - Column Values:
$json.extractedData.rowData[0]["First Name"] - JSON Response: Available as structured JSON in n8n response
Use Cases
- API feeds: Extract filtered rows and push them directly to REST endpoints or webhook consumers.
- Database ingestion: Turn Excel reports into structured JSON nightly before inserting into SQL/NoSQL stores.
- Validation & QA: Pull ranges for rule checks, send alerts, or enrich other workflows without exporting manually.