Skip to main content

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

  1. Add the PDF4me node to the workflow
  2. Select the "Extract rows from Excel worksheet" action
  3. Provide the Excel source and extraction window
Extract Rows from Excel

Parameters

Important: Parameters marked with an asterisk (***) are required. Row/column indexes are 0-based (Row 0 = Excel row 1).

ParameterTypeDescriptionExample
Input Data Type***StringExcel source selector (Binary Data, Base64 String, URL).Binary Data
Input Binary Field***BinaryRequired when Binary Data is selected.{{ $binary.data }}
Base64 Document Content***StringRequired when Base64 String is selected.UEsDBBQAAAA...
Document URL***StringRequired when URL is selected. Public file link.https://files.example.com/report.xlsx
File Name***StringLogical workbook name with extension.analytics.xlsx
Worksheet NameStringWorksheet to read. Empty = first sheet.Summary
First Row***Number0-based starting row for extraction.0
Last RowNumber0-based ending row. Use -1 to read to the last data row.-1
First ColumnNumber0-based starting column (0 = column A).0
Last ColumnNumber0-based ending column. Use -1 for last data column.-1
Has Header RowBooleantrue uses First Row as column headers and excludes it from data.true
Exclude Hidden RowsBooleanSkip rows that are hidden in Excel.false
Exclude Hidden ColumnsBooleanSkip hidden columns.false
Exclude Empty RowsBooleanRemove rows where all cells are empty.true
Export Empty CellsBooleanInclude empty cells with empty-string values instead of omitting them.false
Export Values As TextBooleanForce all values to strings. false preserves native types.false
Binary Data Output Name***StringBinary slot storing serialized JSON (PDF4me returns JSON bytes).document

Output

Output Parameters

ParameterTypeDescriptionExample
successBooleanPDF4me operation status - Boolean flag indicating the success or failure of the row extraction process. PDF4me returns true for successful operations and false for any errorstrue
originalFileNameStringOriginal Excel document filename - The name of the input Excel document filemyExcelFile.xlsx
worksheetNameStringWorksheet name - The name of the worksheet from which rows were extractedFirst Worksheet
hasHeaderRowBooleanHeader row status - Indicates whether the first row was treated as headers. true if headers were used, false otherwisetrue
firstRowNumberFirst row index (0-based) - The 0-based index of the first row extracted0
lastRowNumberLast row index (0-based) - The 0-based index of the last row extracted. -1 indicates extraction to the last data row2
firstColumnNumberFirst column index (0-based) - The 0-based index of the first column extracted (0 = column A)0
lastColumnNumberLast column index (0-based) - The 0-based index of the last column extracted. -1 indicates extraction to the last data column-1
excludeEmptyRowsBooleanEmpty row exclusion - Indicates whether empty rows were excluded. true if excluded, false if includedtrue
excludeHiddenRowsBooleanHidden row exclusion - Indicates whether hidden rows were excluded. true if excluded, false if includedtrue
excludeHiddenColumnsBooleanHidden column exclusion - Indicates whether hidden columns were excluded. true if excluded, false if includedtrue
exportValuesAsTextBooleanText export mode - Indicates whether values were exported as text. true if forced to strings, false if native types preservedfalse
exportEmptyCellsBooleanEmpty cell export - Indicates whether empty cells were exported. true if included with empty strings, false if omittedfalse
exportAsObjectBooleanObject export mode - Indicates whether data was exported as object formatfalse
hyperlinkFormatStringHyperlink format - Format used for hyperlinks in extracted data. Values: "Text", "Url", etc.Text
cultureStringCulture/Locale code - Culture code used for data extraction (e.g., "en-US", "de-DE", "fr-FR")en-US
rowsExtractedNumberNumber of rows extracted - The total count of rows that were successfully extracted1
extractedDataObjectExtracted data object - Nested object containing the extracted row data with rowData array{"rowData": [{"Column1": 1, "First Name": "Dulce"}]}
messageStringOperation message - Descriptive message indicating the result of the row extraction operation, including the number of rows extracted and worksheet nameSuccessfully 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 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'"
}
]

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.

Get Help