Add Rows to Excel in Power Automate
PDF4me Add Rows to Excel action enables dynamic insertion of JSON data as rows into Excel documents in Power Automate with intelligent formatting and type conversion. This powerful data insertion feature supports two distinct modes: table-based insertion (with automatic header matching and table structure maintenance) and coordinate-based insertion (with precise positioning control), plus automatic conversion of strings to numbers/dates, culture-specific parsing, customizable date/numeric formatting, and null value handling, perfect for automated data population, report generation, and database-to-Excel 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 insertion services.

Key Features
- Dual Insertion Modes: Table-based (with header matching) or coordinate-based (exact positioning)
- JSON Data Support: Insert single objects or arrays of objects as Excel rows
- Automatic Type Conversion: Convert JSON strings to Excel numbers and dates automatically
- Format Customization: Apply custom date and numeric formatting patterns
- Culture Support: Parse dates and numbers according to specified culture codes
- Null Value Handling: Option to skip null values or insert as empty cells
Parameters
Complete list of parameters for the Add Rows to Excel action. Configure these parameters to control data insertion.
Important: Parameters marked with an asterisk (***) are required. Some parameters are conditional based on the insertion mode.
Insertion Modes
The action operates in two modes based on the TableName parameter:
- Table-Based Insertion: When
TableNameis provided (non-empty) - Matches JSON properties to table headers, usesExcelRowNumberfor position, maintains table structure - Coordinate-Based Insertion: When
TableNameis empty or null - Inserts at exact row/column coordinates usingInsertFromRowandInsertFromColumn, no header matching
| Parameter | Type | Description | Example |
|---|---|---|---|
| File Content*** | Base64 | Source 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*** | String | Excel 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 |
| Json Input*** | String | JSON Data to Insert • JSON data as string (array of objects or single object) • Array Format: [{"Name":"John","Age":30},{"Name":"Jane","Age":28}] - Inserts multiple rows• Single Object Format: {"Name":"John","Age":30} - Inserts single row• Property names match table headers (table mode) or determine order (coordinate mode) | [{"Name":"John","Age":30}] |
| Worksheet Name | String | Target Worksheet Name • Name of worksheet to insert data into • Default: "Sheet1" • Empty or null defaults to first worksheet • Must match worksheet name exactly | Sheet1 |
| Table Name | String | Excel Table Name • Name of Excel table for table-based insertion • Empty = coordinate-based mode • Non-empty = table-based mode • Switches insertion mode behavior | SalesTable |
| Excel Row Number | Number (int) | Table Position (Table Mode) • 1-based position within table (table mode only) • 1 = first data row after headers • Must be ≥ 1 and within table bounds • Ignored in coordinate mode | 5 |
| Insert From Row | Number (int) | Start Row (Coordinate Mode) • 1-based row number where insertion starts • Coordinate mode only - required and must be ≥ 1 • Error if used with TableName • First row in worksheet = 1 | 10 |
| Insert From Column | Number (int) | Start Column (Coordinate Mode) • 1-based column number where insertion starts • Coordinate mode only - required and must be ≥ 1 • Error if used with TableName • First column (A) = 1, B = 2, etc. | 3 |
| Convert Numeric And Date | Boolean | Automatic Type Conversion • True - Converts JSON numbers to Excel numeric values, date-like strings to DateTime values (applies DateFormat and NumericFormat) • False - Insert all values as-is without type conversion or formatting • Default: true • Data Type Handling: Numbers → Numeric with NumericFormat; Date-like strings → DateTime with DateFormat; Other strings → Text; Boolean → Boolean; Null → Empty (if not ignored); Objects/Arrays → String (JSON) | true |
| Date Format | String | Excel Date Format • Excel date format pattern to apply • Examples: "yyyy-MM-dd", "MM/dd/yyyy", "dd-MMM-yyyy" • Default: "yyyy-MM-dd" • Used when ConvertNumericAndDate = true | MM/dd/yyyy |
| Numeric Format | String | Excel Numeric Format • Excel numeric format pattern to apply • Examples: "N2", "#,##0.00", "0.00%" • Default: "N2" • Used when ConvertNumericAndDate = true | #,##0.00 |
| Ignore Null Values | Boolean | Null Value Handling • True - Skip null values (don't insert into cells) • False - Insert null as empty cells • Default: false • Affects how JSON nulls are processed | false |
| Ignore Attribute Titles | Boolean | Case-Insensitive Header Matching • True - Case-insensitive matching of JSON properties to headers • False - Case-sensitive matching • Default: false • Useful for flexible JSON property naming | true |
| Culture Name | String | Culture for Date/Number Parsing • Culture code for parsing (e.g., "en-US", "de-DE", "fr-FR") • Default: "en-US" • Affects date and number interpretation • Important for international data | en-US |
Output
The PDF4me Add Rows to Excel action returns comprehensive output data for seamless Power Automate flow integration:
- Table
- JSON
- Flow Integration
Table View
Response data in a structured table format:
| Parameter | Type | Description |
|---|---|---|
| document | Base64 | Excel document with new rows inserted |
| Success | Boolean | true if operation successful, false if failed |
| Error Message | String | Error description (null if successful) |
| Errors | Array | List of detailed error information (empty array if successful) |
JSON Response Format
The raw JSON response from the action:
{
"document": "[Base64 Excel Content with Inserted Rows]",
"Success": true,
"ErrorMessage": null,
"Errors": []
}
Error Response Example:
{
"document": null,
"Success": false,
"ErrorMessage": "Table not found",
"Errors": [
{
"Code": "TABLE_ERROR",
"Message": "The specified table 'SalesTable' does not exist in worksheet 'Sheet1'"
}
]
}
Power Automate Flow Usage
Use Excel files with inserted data in subsequent actions:
- Database Export: Insert SQL query results into Excel tables
- API Data Population: Add REST API response data to Excel reports
- Form Submissions: Insert Microsoft Forms responses into Excel logs
- CRM Integration: Populate Excel with Dynamics 365 or Salesforce data
- Email Distribution: Send updated Excel reports with new data rows
- SharePoint Publishing: Upload populated Excel files to document libraries
Common Error Messages
Understanding and troubleshooting errors helps ensure smooth Excel data insertion workflows:
| Error Message | Cause | Solution |
|---|---|---|
| "Request is empty" | Request object is null | Provide valid request object |
| "Document is empty" | Document object is null | Provide valid Excel document |
| "JSON input is required" | JsonInput is null or empty | Provide valid JSON data string |
| "Invalid JSON structure" | Malformed JSON syntax | Fix JSON formatting and syntax |
| "Worksheet '{name}' not found" | Invalid worksheet name specified | Use existing worksheet name |
| "Table '{name}' not found" | Invalid table name in table mode | Use existing table name |
| "ExcelRowNumber must be greater than 0 for table-based insertion" | ExcelRowNumber < 1 in table mode | Set ExcelRowNumber ≥ 1 |
| "InsertFromRow must be greater than 0 for coordinate-based insertion" | InsertFromRow < 1 in coordinate mode | Set InsertFromRow ≥ 1 |
| "InsertFromColumn must be greater than 0 for coordinate-based insertion" | InsertFromColumn < 1 in coordinate mode | Set InsertFromColumn ≥ 1 |
| "InsertFromRow and InsertFromColumn are ignored when TableName is specified" | Using coordinate parameters in table mode | Set both to 0 or omit when using TableName |
| "ExcelRowNumber X is beyond table bounds..." | Position exceeds table size | Use valid position within table range |
| "No valid data found in JSON input" | Empty array or no parseable data | Provide valid JSON data with at least one object |
Workflow Examples
The PDF4me Add Rows to Excel action in Power Automate provides comprehensive workflow templates designed for real-world business scenarios:
- Sales Data Import
- Form Responses
- CRM Export
- API Integration
Automated Daily Sales Data Import Workflow
Transform your sales reporting with automated data insertion into Excel tables:
Complete Workflow Steps:
- Trigger: Scheduled daily trigger at 11 PM to collect sales data
- Get Sales Data: Execute SQL query to fetch today's sales from database
- Convert to JSON: Transform SQL results to JSON array format
- Get Excel Template: Retrieve sales report template from SharePoint
- Add Rows (Table Mode): Insert JSON data into "DailySales" table
- Set Parameters: TableName = "DailySales", ExcelRowNumber = 1
- Enable Conversion: ConvertNumericAndDate = true for proper formatting
- Apply Formats: DateFormat = "MM/dd/yyyy", NumericFormat = "#,##0.00"
- Email Report: Send updated Excel to sales managers
- Archive: Store in daily reports SharePoint library
Business Benefits:
- Automates insertion of 200+ daily sales records into Excel
- Eliminates manual data entry saving 2 hours daily
- Ensures consistent date and currency formatting
- Maintains Excel table structure and formulas automatically
Automated Microsoft Forms to Excel Workflow
Streamline your form data collection with automated Excel insertion:
Complete Workflow Steps:
- Trigger: When a new Microsoft Forms response is submitted
- Get Response: Retrieve form submission data and ID
- Format JSON: Create JSON object with form field values
- Get Excel Log: Retrieve form responses Excel from SharePoint
- Add Row (Coordinate Mode): Insert at next available row
- Set Coordinates: InsertFromRow = dynamic (last row + 1), InsertFromColumn = 1
- Culture Settings: CultureName = "en-US" for US date formats
- Ignore Nulls: IgnoreNullValues = true for optional fields
- Update SharePoint: Upload updated Excel log file
- Send Confirmation: Email submitter with confirmation
Business Benefits:
- Logs 500+ form submissions monthly automatically
- Eliminates manual form response transcription
- Handles optional fields with null value skipping
- Provides real-time Excel log of all submissions
Automated Weekly CRM to Excel Export Workflow
Optimize your reporting with automated CRM data export to Excel:
Complete Workflow Steps:
- Trigger: Scheduled weekly on Monday at 8 AM
- Query Dynamics 365: Fetch all new opportunities from last week
- Filter Data: Apply business logic filters and transformations
- Create JSON Array: Convert CRM records to JSON array format
- Get Excel Template: Retrieve weekly opportunities template
- Add Rows (Table Mode): Insert into "Opportunities" table
- Set Position: ExcelRowNumber = 2 (after header row)
- Case Insensitive: IgnoreAttributeTitles = true for flexible matching
- Format Currency: NumericFormat = "$#,##0.00" for deal values
- Email Sales Team: Distribute populated report to sales leadership
Business Benefits:
- Exports 100+ CRM opportunities weekly automatically
- Ensures accurate currency and date formatting
- Flexible header matching handles CRM field name variations
- Reduces manual CRM reporting time by 95%
Automated REST API to Excel Integration Workflow
Enhance your data integration with automated API data insertion:
Complete Workflow Steps:
- Trigger: Scheduled hourly data refresh
- Call REST API: Execute HTTP GET to external data service
- Parse Response: Extract JSON array from API response
- Transform Data: Apply business logic and calculations
- Get Excel Dashboard: Retrieve real-time dashboard Excel from SharePoint
- Clear Old Data: Remove previous data rows (optional separate action)
- Add New Rows (Coordinate Mode): Insert fresh API data
- Set Position: InsertFromRow = 3, InsertFromColumn = 2 (B3)
- Auto Convert: ConvertNumericAndDate = true for metrics
- Refresh SharePoint: Upload updated dashboard for stakeholders
Business Benefits:
- Refreshes Excel dashboard with API data 24 times daily
- Provides near real-time data visibility in familiar Excel format
- Automatically formats numbers and dates from API responses
- Eliminates manual API data extraction and Excel updates
Industry Use Cases & Applications
- Sales & Marketing
- Finance & Accounting
- Human Resources
- Operations & Manufacturing
- IT & Technology
- Healthcare & Medical
Sales & Marketing Use Cases
- Sales Pipeline Reports: Insert CRM opportunity data into Excel sales pipelines
- Lead Tracking: Add new leads from forms to Excel tracking sheets
- Campaign Analytics: Populate marketing campaign results from analytics APIs
- Customer Lists: Export customer data from databases to Excel customer lists
Finance & Accounting Use Cases
- Transaction Logs: Insert daily financial transactions into Excel ledgers
- Expense Reports: Add employee expense submissions to Excel expense reports
- Budget Tracking: Populate actual spending data into budget vs. actual templates
- Invoice Generation: Insert invoice line items into Excel invoice templates
Human Resources Use Cases
- Employee Records: Add new hire information to Excel employee databases
- Attendance Tracking: Insert daily attendance data into Excel timesheets
- Payroll Processing: Populate hours worked into Excel payroll templates
- Performance Data: Add review scores and metrics to Excel performance trackers
Operations & Manufacturing Use Cases
- Inventory Updates: Insert stock level changes into Excel inventory sheets
- Production Logs: Add production run data to Excel manufacturing logs
- Quality Metrics: Populate quality control results into Excel QC reports
- Maintenance Records: Insert equipment maintenance data into Excel service logs
IT & Technology Use Cases
- System Monitoring: Add server metrics and alerts to Excel monitoring dashboards
- Ticket Tracking: Insert help desk tickets into Excel IT service logs
- Asset Management: Populate IT asset data into Excel asset inventory
- License Compliance: Add software license usage to Excel compliance trackers
Healthcare & Medical Use Cases
- Patient Records: Insert patient visit data into Excel medical logs
- Lab Results: Add laboratory test results to Excel result tracking sheets
- Appointment Logs: Populate appointment data into Excel scheduling reports
- Billing Records: Insert patient billing information into Excel billing templates