Skip to main content

Extract Rows from Excel in Power Automate

PDF4me Extract Rows from Excel action enables extraction of specified rows from Excel documents as structured JSON data in Power Automate with comprehensive filtering and formatting options. This powerful data extraction feature supports selective row and column range extraction, automatic header row processing, hidden row/column exclusion, empty row filtering, and flexible data type handling (numeric or text export), perfect for data integration, API feeding, database population, and automated data transformation workflows across Microsoft 365.

Related Blog Posts
No blog post yet for this feature — coming soon.
In the meantime, browse the PDF4me blog for tutorials and workflows across every platform.
Visit the blog →

Authenticating Your API Request​

To access the PDF4me Web API through Power Automate, every request must include proper authentication credentials. Authentication ensures secure communication and validates your identity as an authorized user, enabling seamless integration between your Power Automate flows and PDF4me's powerful Excel data extraction services.

Extract Rows from Excel Power Automate

Key Features​

  • JSON Output Format: Extract Excel data as structured JSON for seamless integration
  • Flexible Row/Column Selection: Specify exact ranges or extract all data
  • Header Row Support: Use first row as headers or auto-generate column names
  • Advanced Filtering: Exclude hidden rows, hidden columns, and empty rows
  • Data Type Control: Export as native types (numbers, dates) or all as text
  • Empty Cell Handling: Include or exclude empty cells from output

Parameters​

Complete list of parameters for the Extract Rows from Excel action. Configure these parameters to control data extraction.

ParameterRequiredWhat it doesExample
File ContentOptionalContent of the Excel file to process. Map it from the file content returned by a previous action, such as SharePoint or OneDrive Get file content.[File Content from Get File]
File NameOptionalName of the Excel file, including its extension (for example `report.xlsx`). Map it from the file name returned by a previous action. Defaults to `ExtractRows.xlsx`.data.xlsx
Worksheet NameOptionalName of the worksheet to extract from (leave empty for first worksheet).Sheet1
Has Header RowOptionalWhether the first row contains column headers. Defaults to `Yes`.true
First Row (Start)OptionalStarting row for extraction (0-based, 0 = first row). Defaults to `0`.0
Last Row (End)OptionalEnding row for extraction (-1 for last row with data). Defaults to `-1`.-1
First Column (Start)OptionalStarting column for extraction (0-based, 0 = first column). Defaults to `0`.0
Last Column (End)OptionalEnding column for extraction (-1 for last column with data). Defaults to `-1`.-1
Exclude Empty RowsOptionalSkip rows that are completely empty. Defaults to `Yes`.false
Exclude Hidden RowsOptionalSkip hidden rows in extraction. Defaults to `Yes`.false
Exclude Hidden ColumnsOptionalSkip hidden columns in extraction. Defaults to `Yes`.false
Export Values As TextOptionalExport all cell values as text strings. Defaults to `No`.false
Export Empty CellsOptionalInclude empty cells in the output. Defaults to `No`.false
Export as Object StructureOptionalIf Yes, the data is returned as a structured object instead of an array. Defaults to `No`.No
Hyperlink FormatOptionalWhat to return for cells that contain a hyperlink. Options: Text, Url, Both. Defaults to `Text`.Text
Culture & Language SettingsOptionalCulture name for data formatting (e.g., en-US, fr-FR, de-DE). Defaults to `en-US`.en-US

Output​

The PDF4me Extract Rows from Excel action returns comprehensive JSON output data for seamless Power Automate flow integration:

Table View

Response data in a structured table format:

FieldTypeWhat it contains
Extracted Data (JSON)File contentThe extracted rows as JSON. The connector declares it as file content (format byte); use base64ToString() if you receive Base64 text, then Parse JSON to read the rows.
SuccessYes/NoWhether the operation completed successfully
Error MessageTextError message if operation failed
Error DetailsArrayList of detailed error messages

Common Error Messages​

Understanding and troubleshooting errors helps ensure smooth Excel data extraction workflows:

Error MessageCauseSolution
"Request is empty"Request object is nullProvide valid request object
"Document is empty"Document object is nullProvide valid Excel document
"Workbook contains no worksheets"Excel file has 0 worksheetsProvide valid Excel file with worksheets
"Worksheet '{name}' not found"WorksheetName doesn't exist in workbookUse existing worksheet name
"Invalid worksheet selection"Worksheet access errorVerify worksheet name and file integrity
"Available worksheets in workbook (X total)"Informational message when worksheet validation failsReview worksheet name and use valid value from X available worksheets
"Invalid start row {row}. Row numbers must be positive."FirstRow < 0Use FirstRow ≥ 0 (0-based indexing)
"Row {row} exceeds maximum data row ({maxRow})"LastRow > MaxDataRowUse valid row range within worksheet data
"Invalid range {start}-{end}: End row cannot be less than start row"LastRow < FirstRowEnsure LastRow ≥ FirstRow

Note: Error messages show 1-based row numbers (e.g., Row 1, Row 2) while parameters use 0-based indexing (0, 1).

Workflow Examples​

The PDF4me Extract Rows from Excel action in Power Automate provides comprehensive workflow templates designed for real-world business scenarios:

Automated Excel to REST API Integration Workflow

Transform your data integration with automated Excel to API data feeding:

Complete Workflow Steps:

  1. Trigger: Excel file uploaded to SharePoint "API Data" folder
  2. Get Excel File: Retrieve uploaded Excel from SharePoint
  3. Extract All Rows: Set FirstRow = 0, LastRow = -1, HasHeaderRow = true
  4. Parse JSON: Convert RowData array to individual objects
  5. Loop Through Rows: Use Apply to each for RowData items
  6. Call REST API: HTTP POST each row to external API endpoint
  7. Log Results: Record successful/failed API calls
  8. Send Summary: Email admin with processing summary

Business Benefits:

  • Integrates 100+ Excel rows with external APIs weekly
  • Eliminates manual data entry to API systems
  • Provides structured JSON format for API consumption
  • Automates data synchronization saving 10 hours weekly

Industry Use Cases & Applications​

IT & System Integration Use Cases

  • API Data Feed: Extract Excel data as JSON for REST API consumption
  • Database Migration: Export Excel data to SQL, NoSQL, or cloud databases
  • ETL Processes: Extract Excel data for transformation and loading pipelines
  • System Synchronization: Sync Excel data with multiple business systems

Get Help​