Skip to main content

Excel Populate in Power Automate

What this action does

PDF4me Excel - Populate merges a JSON payload into an Excel template that contains Aspose Smart Marker fields and returns a populated .xlsx ready to attach, store, or send. Map the template from SharePoint, OneDrive, or Dataverse, paste or build the JSON from dynamic content, and pipe the populated workbook into SharePoint Create file, Outlook Send an email, OneDrive Create file, Dataverse Add a new row, or Teams Post a message. Multi-sheet workbooks, formula recalculation, and locale-aware number/date formatting are handled in a single action.

Related Blog Posts(1)

Before you run this action: author an Excel template with Smart Marker fields like &=Items.ItemName. The full grammar (modifiers, multi-sheet layout, nested JSON paths, formula handling, culture formatting) plus downloadable sample templates and JSON payloads are on the Excel Populate Template Syntax reference page.

Authenticating Your API Request

The PDF4me Connect connector in Power Automate requires a valid connection holding your PDF4me API key. Create the connection once at flow design time, then every PDF4me action in your tenant reuses it.

Important Facts You Should Not Miss

JSON Data keys must match marker data-source names
A marker &=Items.ItemName requires the JSON to contain an Items array of objects with an ItemName property. Field names are case sensitive (itemName will NOT match ItemName).
Worksheet Indexes is 1-based, comma-separated
Leave Worksheet Indexes empty to populate every sheet. Pass 2 to populate only the second sheet, or 1,3 to populate the first and third. Useful for multi-sheet templates where one upstream system only owns part of the workbook.
Formulas recalculate by default
Calculate Formulas defaults to Yes so totals, SUMs, and dependent cells are accurate the moment the recipient opens the file. Set to No if you want to recalculate downstream and save time.
Excel - Populate action in Power Automate. File Content is mapped from a SharePoint Get file content step. JSON Data shows an Items array with three records (A123, B456, C789) each carrying ItemName, Qty, and UnitPrice. File Name is Populate.xlsx. Worksheet Indexes is 2.

The Excel - Populate action configured in a Power Automate flow with the file mapped from SharePoint, an inline JSON Items array, and Worksheet Indexes restricting the merge to sheet 2.

Parameters

Required: File Content, JSON Data. Recommended: File Name (defaults to Populate.xlsx) and Worksheet Indexes when the template has more than one sheet. Advanced: Strict JSON Strings, Culture & Language Settings, Calculate Formulas, Quote Prefix To Style.

ParameterRequiredWhat it doesExample
File ContentYesExcel template (.xlsx) as binary dynamic content from a prior step: SharePoint Get file content, OneDrive Get file content, Dataverse Download file, Outlook Get attachments. The template must contain Smart Marker cells.@triggerOutputs()?['body']
File NameNoTemplate filename including .xlsx extension. Defaults to Populate.xlsx. Used for tracking and as the basis for Output File Name.Populate.xlsx
JSON DataYesJSON object whose top-level keys match the data source names in your markers. May be pasted inline, built from a Compose step, or mapped from a Parse JSON / HTTP step.{"Items":[{"ItemName":"A123","Qty":"55","UnitPrice":"3.05"}]}
Worksheet IndexesNoComma-separated 1-based sheet indexes to populate. Empty = all sheets. Pass 2 for sheet 2 only, 1,3 for sheets 1 and 3.2
Strict JSON StringsNoYes (default) preserves quoted JSON string primitives as text in the Excel cell. No coerces quoted numeric-looking strings into typed numeric values during merge.Yes
Culture & Language SettingsNoStandard culture name controlling number, date, and currency formatting written into cells. Defaults to en-US. Examples: fr-FR, de-DE, ja-JP.en-US
Calculate FormulasNoYes (default) recalculates the workbook after the merge so totals are accurate on open. No skips recalculation to save time when a downstream step will recalc.Yes
Quote Prefix To StyleNoApplies the Excel quote-prefix flag to styled values so cells that look numeric but should stay text (account numbers, ZIP codes with leading zeros) render as text.Yes
Advanced parameters panel of the Excel Populate action: Strict JSON Strings Yes, Culture and Language Settings en-US, Calculate Formulas Yes, Quote Prefix To Style Yes

The Advanced parameters panel of Excel - Populate exposes Strict JSON Strings, Culture & Language Settings, Calculate Formulas, and Quote Prefix To Style.

Output

Dynamic content fieldTypeWhat it contains
Output File ContentBinaryThe populated Excel workbook. Pass into SharePoint Create file, OneDrive Create file, Outlook Send an email with attachment, Dataverse Add a new row, or Teams Post a message with file.
Output File NameStringThe output filename, based on File Name with the .xlsx extension.
SuccessBooleantrue on successful population, false on failure. Use in a Condition step for retry / branching logic.
Error MessageStringShort error description on failure. Empty when Success is true.
Error Details ItemArrayItemised error messages when the engine encountered multiple issues. Empty when Success is true.
Excel - Populate dynamic content picker showing Output File Content, Output File Name, Success, Error Message, and Error Details Item

Output dynamic content from the Excel - Populate action, ready to map into downstream Microsoft 365 actions.

Raw response shape

For reference (or when calling the underlying REST endpoint directly), the action body looks like this on success:

Raw HTTP response from the Excel - Populate action. Status code 200, Content-Type application/json. The body contains a document field with the Base64-encoded XLSX, fileName Populate.xlsx, and success true.

Status code 200, Content-Type application/json. The body carries document (Base64 XLSX), fileName, and success. errorMessage and the Errors array are only present on failure runs.

Quick sample (try in 3 minutes)

Two ready-to-run combinations match the screenshots above. Download each pair, drop the XLSX into File Content, paste the JSON into JSON Data, and run.

Combo A: simple Items (matches the parameter screenshot)

Uses template.xlsx with Worksheet Indexes = 2 (Sheet2 has the simple Items markers used in the parameter screenshot). Pair with the matching flat Items JSON.

Combo B: rich invoice with Excel Table

Uses the Invoice sheet of template.xlsx with nested &=RootData.Items.* markers, structured-reference formulas in a SimpleInvoice Table, subtotal + tax + total math.

Combo C: multi-sheet workbook

Three-sheet template demonstrating different data sources per sheet. Sheet order in the file is Items, Employees, Products.

Flow examples

Common Power Automate flow patternsTypical ways to chain Excel - Populate into a flow.
SharePoint list to invoice workbook
  1. SharePoint When an item is created trigger fires on the Orders list.
  2. SharePoint Get items pulls the matching line items from the Order Lines list.
  3. Compose builds the JSON Data payload with an Items array from the line items.
  4. SharePoint Get file content loads the invoice Excel template.
  5. Excel - Populate merges template plus JSON.
  6. Outlook Send an email attaches Output File Content to the customer.
Scheduled monthly inventory report
  1. Recurrence trigger fires on the first of every month at 09:00.
  2. Dataverse List rows pulls current inventory.
  3. Compose shapes the result into a JSON object with a Products array.
  4. SharePoint Get file content loads the 3-sheet template.
  5. Excel - Populate runs with Worksheet Indexes set to 2 (Products sheet only).
  6. OneDrive Create file archives the report; Teams Post a message links to it.
Forms response to staff roster
  1. Microsoft Forms When a new response is submitted trigger fires.
  2. Dataverse List rows pulls the related employees and departments.
  3. Compose builds the JSON Data with an Employees array.
  4. Excel - Populate merges into the HR roster template, Culture set to the locale on the Forms response.
  5. Outlook Send an email delivers the populated workbook to the HR manager.

Frequently Asked Questions

What is the JSON Data field expected to contain?+
A JSON object whose top-level keys match the data source names used in the Smart Markers of your Excel template. For markers like &=Items.ItemName, the JSON must contain an Items array of objects with an ItemName field. Field names are case sensitive.
What syntax do the cells in the Excel template use?+
Aspose Smart Markers. Cells use &=DataSource.FieldName as the marker. Optional modifiers in parentheses control layout: (dynamic), (horizontal), (noadd), (skip:N), (copystyle), (shift), (repeat). See the Excel Populate Template Syntax page for the full grammar with examples.
What does Worksheet Indexes do?+
Restricts the merge to specific sheets. The value is comma-separated 1-based sheet indexes (for example 1,3 to populate the first and third sheet). Leave it empty to populate every sheet in the workbook.
Does Excel Populate recalculate formulas?+
Yes by default. Calculate Formulas is Yes by default so the workbook arrives with totals and aggregates already accurate. Set it to No when you intend to recalculate later in your own pipeline and want to skip the cost.
What does Strict JSON Strings do?+
Yes (default) preserves quoted JSON string primitives as text in the Excel cell. Set No to coerce quoted numeric-looking strings into typed numeric values during the merge. Use the default unless you have a specific reason to convert string primitives.
My template has a sheet I do not want populated. How do I exclude it?+
Use Worksheet Indexes. If your workbook has sheets in order Cover, Data, Notes (indexes 1, 2, 3) and you only want Data populated, pass 2. Cover and Notes stay untouched.
How big can the JSON payload be?+
Practical limits are bounded by the Power Automate action body size cap plus Excel cell limits. For larger payloads, write the JSON to a SharePoint or OneDrive file and reference it via a custom dispatcher pattern, or split the work into one call per sheet using Worksheet Indexes.
Does this work in Power Automate Desktop?+
PDF4me Connect is a cloud connector available in Power Automate (the web flow designer). For Power Automate Desktop, call the Excel Populate REST endpoint with the HTTP action.

Get Help