How to Create an Excel File When an Item is Created in SharePoint List Using Power Automate?

While working with Power Automate, I needed to create an Excel file from a SharePoint list item. The goal was to ensure that every new item added to the SharePoint list would create a corresponding Excel file containing all the details in our document library.

In this article, I will describe how to create an Excel file when an item is created in SharePoint list using Power Automate. Creating these Excel files can be a bit tricky, so I will provide a step-by-step process for achieving it.

Create an Excel File When an Item is Created in SharePoint List Using Power Automate

Before creating the flow, we need to create a SharePoint list. Here, I created a SharePoint list with the following columns and data types:

ColumnsData Types
First Name(Title)Single line of text
Last NameSingle line of text
EmailSingle line of text
Phone NumberSingle line of text
CompanySingle line of text
CertificationChoice
Study Material RequestYes/No
CommentsMultiple lines of text
power automate create excel file from sharepoint list

Also, create a blank Excel file in your SharePoint document library, as shown below.

create excel from sharepoint list power automate

Now follow the below steps:

1. Open the Power Automate home page, click + Create, select the Automated cloud flow, enter the flow name, and choose the trigger’s flow (When an item is created).

create excel file from sharepoint list power automate

2. Now, click on the ‘When an item is created‘ option on the left side. Under Parameters, choose your Site Address and List Name.

Create an Excel file from SharePoint list items using Power Automate

3. Next, click the + icon to add an action. choose a Get file content action for SharePoint Connector and configure the required parameters:

  • Site Address: Select the SharePoint site address from the dropdown where we create the blank Excel file.
  • File Identifier: Choose the Excel file we created before.
Create An Excel File And Add Rows from SharePoint Using Power Automate

4. Then save the flow and test it. After the flow runs, copy the body of the “Get file content” action.

Power Automate Excel File When an Item is Created in SharePoint List

5. Then edit the flow and add a Compose action. Inside the Compose action’s input field, paste the body of the “Get file content” action.

How to create an Excel File from SharePoint list items using Power Automate

After that, delete the Get file content action and that blank Excel file in your document library.

6. Now, add an action to store Excel files in a SharePoint library. Click the + icon to add the Create file action (under SharePoint connector). Provide the required parameters:

  • Site Address: Select the SharePoint site address from the dropdown menu where you store all your Excel files.
  • Folder Path: Select the folder path.
  • File Name: Provide the Excel file name with the .xlsx extension. Here, I put the SharePoint ID column from dynamic content.
  • File Content: Provide the dynamic content from the Compose action, ‘Output.’
Power Automate Create an Excel file from SharePoint list items

7. Now, let’s create an Excel table. Click the + icon to add the Create table action (under the Excel Online (Business) connector). Provide the required parameters:

  • Location: Select the SharePoint site address from the dropdown menu
  • Document Library: Select the SharePoint site address from the dropdown menu
  • File: Provide the dynamic content from the Create file, body/Id.
  • Table Range: I have eight columns, so I specify the range as A1:H1. Adjust this according to your columns.
  • Table Name: Give the table name.
  • Columns Names: Put all your column names.
Create an Excel File in Power Automate When an Item is Created in SharePoint List

8. Now, let’s add a row to the table. Click the + icon to add the “Add a row into a table” action (under the Excel Online (Business) connector) and provide the required parameters:

  • Location: Choose SharePoint Site.
  • Document Library: Choose the Documents folder.
  • File: Provide the dynamic content from the Create file, body/Id
  • Table: Provide the table name from the dynamic content.
  • Row: Put below the table value
Column NameDynamic Content
First NametriggerBody()?[‘Title’]
Last NametriggerBody()?[‘Last Name’]
EmailtriggerBody()?[‘Email’]
Phone NumbertriggerBody()?[‘Phone Number’]
CompanytriggerBody()?[‘Company’]
CertificationtriggerBody()?[‘Certification’][‘Value’]
Study Material RequesttriggerBody()?[‘Study Material Request’]
CommenttriggerBody()?[‘Comment’]
When an Item is Created in SharePoint List Create an Excel File using Power Automate

Now click on Save and run the Flow manually. Once the flow runs, add an item to the SharePoint list.

Create Excel Workbook in SharePoint from Power Automate

After running the flow, you can see one Excel file created in your selected Document library.

Export Excel file when an item created in SharePoint list using Power Automate

When you open that Excel file, you will see the exact data that you added to your SharePoint list.

Power Automate Export Excel file when an item created in SharePoint list

Conclusion

I hope you follow all the steps to create an Excel file when an item is created in the SharePoint list using Power Automate. Check the link below if you need to create an Excel file from SharePoint list items using Power Automate.

You may also like:

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…