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.

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.

Important: Parameters marked with an asterisk (***) are required. All row/column indexes use 0-based numbering (Row 0 = first row, Column 0 = column A).

ParameterTypeDescriptionExample
File Content***Base64Source Excel File Content
• Map Excel file from previous action output
• Supports Excel files from SharePoint, OneDrive, email attachments
• Can be dynamically retrieved from flow variables
• Must be valid Excel document (.xlsx, .xls formats)
[File Content from Get File]
File Name***StringExcel Document Name
• Specify Excel file name with extension (.xlsx, .xls)
• Used for processing and output file naming
• Must include proper file extension
• Supports dynamic naming from flow variables
data.xlsx
Worksheet NameStringTarget Worksheet Name
• Name of worksheet to extract from
• Null or empty defaults to first worksheet (index 0)
• Must match worksheet name exactly
• Case-sensitive worksheet name
Sheet1
First Row***Number (int)Starting Row (0-based)
• First row to extract (0-based indexing)
0-based indexing: Row 0 = Excel row 1, Row 1 = Excel row 2, etc.
• Must be ≥ 0
• Required parameter
• Note: Error messages display 1-based row numbers
0
Last RowNumber (int)Ending Row (0-based)
• Last row to extract (0-based indexing)
• -1 = extract to last row with data (MaxDataRow)
• Default: -1
• Must be ≥ FirstRow
-1
First ColumnNumber (int)Starting Column (0-based)
• First column to extract (0-based indexing)
0-based indexing: Column 0 = A, Column 1 = B, Column 2 = C, etc.
• Default: 0
• Must be ≥ 0
0
Last ColumnNumber (int)Ending Column (0-based)
• Last column to extract (0-based indexing)
• -1 = extract to last column with data (MaxDataColumn)
• Default: -1
• Must be ≥ FirstColumn
-1
Has Header RowBooleanFirst Row as Headers
True - Use FirstRow as column headers (excluded from data)
False - Auto-generate headers ("Column1", "Column2"...)
• Default: false
• Affects data start row
true
Exclude Hidden RowsBooleanSkip Hidden Rows
True - Skip rows that are hidden in Excel
False - Include hidden rows in extraction
• Default: false
• Useful for filtering report data
false
Exclude Hidden ColumnsBooleanSkip Hidden Columns
True - Skip columns that are hidden in Excel
False - Include hidden columns in extraction
• Default: false
• Useful for filtering report data
false
Exclude Empty RowsBooleanSkip Empty Rows
True - Skip rows where all cells are empty
False - Include empty rows in output
• Default: false
• Improves data quality
false
Export Empty CellsBooleanInclude Empty Cells
True - Include empty cells with empty string values
False - Omit empty cells from JSON output
• Default: false
• Affects JSON structure
false
Export Values As TextBooleanText Export Mode
True - Export all values as text strings (e.g., "30", "50000.50", "true")
False - Preserve data types: Numeric → number, DateTime → ISO string, Boolean → boolean, Text → string, Empty → "" (if ExportEmptyCells = true)
• Default: false
Data Type Handling: When false, data types preserved from Excel; when true, all values converted to strings
false

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:

ParameterTypeDescription
documentBase64JSON data as byte array (serialized)
RowDataArrayExtracted rows as array of objects with column name keys
SuccessBooleantrue if operation successful, false if failed
Error MessageStringError description (null if successful)
ErrorsArrayList of detailed error information (empty array if successful)

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