Skip to main content

Add Rows to Excel in Power Automate: JSON to Excel with PDF4me

PDF4me Excel - Add Rows is a Power Automate action that inserts a JSON object or array as new rows into an Excel workbook, in either table-based mode with automatic header matching or coordinate-based mode with exact cell positioning. Use it to write database query results, form submissions, or API responses straight into an Excel report.

What this action does

PDF4me Excel - Add Rows writes JSON Row Data into an existing workbook, matching properties to headers when Table Name is set, or landing at exact coordinates when it is left empty. Convert Numeric And Date, Date Format Pattern, Numeric Format Pattern, and Culture Name control how the inserted values are typed and formatted.

Related Blog Posts(1)

How Do I Authenticate My Power Automate Flow?

Every PDF4me action in Power Automate requires a valid connection. Create or select one that holds your PDF4me API key so the flow can authenticate Excel row-insertion requests securely.

Important Facts You Should Not Miss

Table Name is the mode switch
A non-empty Table Name activates table-based insertion with header matching and Excel Row Number for position. Leave it empty for coordinate-based insertion using Insert From Row and Insert From Column instead. Mixing both parameter sets in one call returns an error.
The data field is labeled JSON Row Data
Accepts either a single JSON object for one row or an array of objects to insert several rows in one call. Property names drive header matching in table mode.
Type conversion needs the toggle on
Date Format Pattern, Numeric Format Pattern, and Culture Name only take effect when Convert Numeric And Date is enabled. Left off, every value is written as plain text.
Power Automate PDF4me Excel - Add Rows action configured with File Content, File Name, JSON Row Data, Worksheet Name Sheet1, Insert From Row 6, Insert From Column 2, and Advanced parameters Convert Numeric And Date, Date Format Pattern yyyy-MM-dd, and Numeric Format Pattern N2

Map File Content and File Name, set JSON Row Data, pick a Table Name or Insert From Row / Column, then expand Advanced parameters for type conversion and formatting.

Parameters

Required: File Content, File Name, and JSON Row Data must always be provided. Table Name and Excel Row Number apply only to table-based insertion. Insert From Row and Insert From Column apply only to coordinate-based insertion, and are rejected if Table Name is also set.

ParameterRequiredWhat it doesExample
File ContentRequiredBase64 content of the source Excel workbook, mapped from SharePoint, OneDrive, or another prior action.[File Content from Get File]
File NameRequiredExcel filename including extension (.xlsx or .xls), used for processing and output identification.data.xlsx
JSON Row DataRequiredJSON object or array of objects to insert. Each object becomes one row, property names match table headers in table mode.[{"Name":"John","Age":30}]
Worksheet NameOptionalName of the worksheet to insert into. Defaults to Sheet1 if left blank.Sheet1
Table NameOptionalName of an Excel table for table-based insertion. Leave empty to use coordinate-based insertion instead.SalesTable
Excel Row NumberConditional1-based position within the table, table mode only. Ignored in coordinate mode.5
Insert From RowConditional1-based worksheet row where insertion starts, coordinate mode only. Errors if Table Name is also set.10
Insert From ColumnConditional1-based worksheet column where insertion starts, coordinate mode only. Errors if Table Name is also set.3
Convert Numeric And DateOptionalEnables automatic conversion of JSON numbers to Excel numeric values and date-like strings to Excel dates. Default true.true
Date Format PatternOptionalExcel date format applied when Convert Numeric And Date is enabled. Default yyyy-MM-dd.MM/dd/yyyy
Numeric Format PatternOptionalExcel numeric format applied when Convert Numeric And Date is enabled. Default N2.#,##0.00
Ignore Null ValuesOptionalSkips inserting a value for any JSON property that is null when enabled. Default false, which inserts nulls as empty cells.false
Ignore Attribute TitlesOptionalMakes JSON property name matching case-insensitive against table headers when enabled. Default false.true
Culture NameOptionalCulture code used to parse incoming date and number strings before conversion. Default en-US.en-US

Output Fields

FieldTypeWhat it contains
documentBase64The Excel workbook with the new rows inserted.
SuccessBooleantrue if insertion completed, false if the action failed.
ErrorMessageStringError description, null when Success is true.
ErrorsArrayDetailed error objects with Code and Message, empty when Success is true.

What Do the Common Error Messages Mean?

Error MessageCauseSolution
JSON input is requiredJSON Row Data is null or empty.Provide a valid JSON object or array.
Invalid JSON structureMalformed JSON syntax.Fix the JSON formatting before mapping it in.
Worksheet not foundThe named worksheet does not exist in the workbook.Use an existing worksheet name or leave it blank for the first sheet.
Table not foundThe named table does not exist, table mode only.Use an existing Excel table name.
ExcelRowNumber must be greater than 0Excel Row Number is less than 1 in table mode.Set Excel Row Number to 1 or higher.
InsertFromRow and InsertFromColumn are ignored when TableName is specifiedCoordinate parameters were set alongside Table Name.Clear Table Name for coordinate mode, or clear the coordinate fields for table mode.
No valid data found in JSON inputJSON Row Data was an empty array or had no parseable objects.Provide at least one valid object in the JSON payload.

How Do I Set Up Add Rows in Power Automate?

  1. Add PDF4meExcel - Add Rows to your Power Automate flow.
  2. Map File Content and File Name from a previous action (SharePoint, OneDrive, or a database connector).
  3. Set JSON Row Data to your object or array of objects.
  4. Set Table Name for table-based insertion, or leave it blank and set Insert From Row / Insert From Column for coordinate-based insertion.
  5. Expand Advanced parameters to enable Convert Numeric And Date and set formatting. Run the flow, the updated workbook returns as document.

Typical Setups

Workflow ExamplesCommon Power Automate flow patterns using Add Rows.
Daily sales data import (table mode)
  1. A scheduled trigger runs a SQL query to fetch the day's sales records.
  2. The results are converted into a JSON array matching the sales table's column headers.
  3. Get File retrieves the sales report template with a Table Name of "DailySales".
  4. Add Rows inserts the array with Convert Numeric And Date enabled and Numeric Format Pattern set for currency.
  5. The updated report is emailed to sales managers.
Form response logging (coordinate mode)
  1. A Microsoft Forms submission triggers the flow.
  2. The scenario builds a JSON object from the submitted answers.
  3. Get File retrieves the response log workbook.
  4. Add Rows inserts at the next open row using Insert From Row and Insert From Column, with Table Name left blank.
  5. The updated log is saved back to SharePoint.
CRM opportunity export
  1. A weekly trigger queries new opportunities from a CRM connector.
  2. The records are converted into a JSON array with flexible field names.
  3. Add Rows inserts into an "Opportunities" table with Ignore Attribute Titles enabled for case-insensitive header matching.
  4. The populated report is distributed to the sales team.

Practical Tips

Never set Table Name and Insert From Row together
The two parameter sets belong to different insertion modes. Setting both returns an error, clear one set before running.
JSON Row Data accepts a single object or an array
A bare object inserts one row, an array inserts one row per object. Choose the shape that matches how many rows you are writing.
Excel Row Number is 1-based within the table
Row 1 in table mode is the first data row after the header, not the header itself. Set it accordingly when targeting a specific position.
Culture Name affects parsing, not just display
Set Culture Name to match how your source data formats dates and decimals (for example de-DE for comma decimals), otherwise conversion can misread values.
Ignore Attribute Titles solves case-mismatch headaches
If your JSON property names differ in case from the Excel table headers, enable Ignore Attribute Titles instead of renaming every header or every JSON key.

Cheat Sheet

FieldValue
ActionExcel - Add Rows
Mode switchTable Name set = table mode, empty = coordinate mode
JSON Row Data shapeSingle object or array of objects
Default worksheetSheet1
Type conversion toggleConvert Numeric And Date = true (default)
Default date/numeric formatyyyy-MM-dd / N2
Default cultureen-US
Outputdocument (Base64 workbook) + Success + ErrorMessage + Errors

Common Questions

How do I insert JSON data into Excel in Power Automate?+
Add the PDF4me Excel - Add Rows action, map File Content and File Name from a prior action, set JSON Row Data to your JSON payload, then choose Table Name for table-based insertion or Insert From Row and Insert From Column for coordinate-based insertion.
What is the difference between table-based and coordinate-based insertion?+
Table-based insertion is used when Table Name is provided, JSON property names are matched to the Excel table headers and Excel Row Number sets the position within the table. Coordinate-based insertion is used when Table Name is empty, Insert From Row and Insert From Column set the exact worksheet cell where insertion starts, with no header matching.
Can I insert more than one row at once?+
Yes. Pass a JSON array of objects in JSON Row Data and every object becomes its own inserted row. A single JSON object inserts exactly one row.
What happens if I mix table-based and coordinate-based parameters?+
Setting Insert From Row or Insert From Column while Table Name is also set returns an error, since the two parameter sets belong to different insertion modes. Use one mode's parameters at a time.
How does automatic type conversion work?+
With Convert Numeric And Date enabled, JSON numbers become Excel numeric values formatted with Numeric Format Pattern, and date-like strings become Excel DateTime values formatted with Date Format Pattern. Culture Name controls how the incoming values are parsed before conversion. See <a href="https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings" target="_blank" rel="noopener noreferrer">Microsoft's numeric format string reference</a> and <a href="https://learn.microsoft.com/en-us/connectors/pdf4meconnect/" target="_blank" rel="noopener noreferrer">the PDF4me Power Automate connector reference</a> for details.

Industry Use Cases & Applications

  • 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

Same Task on Other Platforms

Get Help