Power Automate
How to add rows in Excel online using Power Automate

How to add rows in Excel online using Power Automate

Adding rows to an excel file or exporting the data in “.xlsx” format, which can be sent to users or other applications as data feed can be a common scenario. In this example, we used the “Excel online business” connector to add rows to the excel file, Previously we already shared a post to filter the excel file and push data to the dataverse.

But still, there are other excel online actions which we will explore in our future posts. Kindly read the known issues and limitations on the reference page.

Create the excel template with the required columns and format it as a table. Upload it in a common location like SharePoint or Onedrive from there we can take its instance.

  • Create Excel
  • Create Table
  • Final Table

Get the excel template.

Get Excel template
Excel Template

Create an excel file in onedrive using the content from the query.

Create Excel in Onedrive
Create excel file

Query records from a table or list, In this case, we used SharePoint list.

Get Items
Query Records

Inside the “Apply to each” action, construct the JSON. The column names in the excel template and JSON should be the same.

Construct JSON
Construct JSON
{
"no":"DynamicValue",
"Name":"DynamicValue",
"Location":"DynamicValue",
"DOB":"DynamicValue",
"Address":"DynamicValue",
"Base Location":"DynamicValue"
}

Pass the JSON to “Add rows into a table” action.

Add rows to table
Add row to table action

The excel file created, can be Sent in Email or can be passed to a network location. Then delete the temporary excel file created in OneDrive if it is not needed. Kindly see this post to create CSV and read CSV.

Please post your queries in the comments section. Happy Building 🙂

0

Leave a Reply

Newsletter Signup

Subscribe to our weekly newsletter below and never miss out the latest updates

%d bloggers like this: