Add a row into a table in a table in Excel Connector(Power Automate Cloud flows)

03/11/2024

Japanese version.

Add a new row to the table.

How to use

The target Excel file must be stored in OneDrive or SharePoint.

The target cell range must be converted to a table.

In this example, we will prepare a table with the items "Code", "Name", "Price", and "Qty".

Sample

Select the "Excel Online (Business)" connector when adding steps to the flow.

Select the "Add a row into a table" from the "Action" menu.

Set Parameters.

Parameters

Location

A list of OneDrive and SharePoints that can be connected will be displayed.

From among them, select the location where the target file is located.

Document Library

For OneDrive, select "OneDrive"; for SharePoint, select "Document".

File

Select a file.

It looks like a file path, but it is only a display and the content is an ID.

If you delete the specified file and then create a file with the same name,

it will be treated as a different file. (Reassignment is required.)

Table

A list of tables that exist in "File" will be displayed.

Select the table of interest from the list.

Items

If you specify up to "table," all items that exist in the specified table will be displayed.

Set the data you want to add here.

When dynamic content is specified for a file or table

No item is displayed because the items is not finalized.

Instead, "Row" is displayed.

Specify the rows to be added here in JSON format.

Although there are many specifications for JSON, the items required here are as follows.

  • Enclose the whole with {}.
  • Describe a single cell in the format item name:data. Enclose the item name and data in ".
  • Separate cells with ,.

For example, add the following row.

CodeNamePriceQty
A-004Melon6005
{
  "Code": "A-004",
  "Name": "Melon",
  "Price": "600",
  "Qty": "5"
}

Dynamic content

The dynamic content available in the subsequent steps is the added items.

This allows for things like sending the content of the added line via email as well.

If "Row" is specified in JSON, it will not appear in dynamic content.

If you want to use it, use the following formula. (The red text indicates that changes are necessary.)

outputs('ActionName')? ['body/ItemName'].

The action name and item name need to be changed and if there are spaces, they need to be changed to _.

If you use "code" in this case, specify it like this

outputs('Add_a_row_into_a_table')? ['body/Code'].

---

Links

Excel Online (Business) Connector(Power Automate Cloud flows)

How to rank arrays of numbers.

How to median arrays of numbers.