Update OneDrive Excel file from SharePoint list using Power Automate (MS Flow)

Create automated flows to dynamically update an Excel file stored in OneDrive with data from the SharePoint list.

This page contains step-by-step instructions for exporting the SharePoint list to Excel and setting up a Power Automate flow (MS Flow).

Export SharePoint List to Excel

1. Open the SharePoint list which data you want to export.

Important

The list view must include the ID column. The item ID is unique and requires to identify the row that should be updated.

List view with item ID column

2. On the command bar, click ExportExport to CSV file:

Export to CSV file

3. Launch Excel Desktop and create a blank workbook. On the Data tab, click From Text/CSV:

Import from Text/CSV

4. Select the exported .csv file and click Import. In a dialog box, you will see the preview of the table. Click Load:

Preview dialog box

5. Excel creates a table and imports data from the .csv file. The table name matches the SharePoint list name.

Excel table

6. Save the Excel file and upload it to your OneDrive account.

Flow

Below are instructions for creating automated flows to add, update, and delete Excel table rows when data in the SharePoint list changes.

To create an automated flow, sign in to Power Automate. On the navigation bar, select My flows. Then select + New flowAutomated cloud flow:

New flow

Add a row

Create a flow that triggers when a SharePoint item is created and adds a new row to the Excel table.

These are the flow steps:

Flow to add a row to the Excel table

  1. When an item is created trigger.

    Specify the SharePoint site address. Then select the SharePoint list name from a dropdown.

    When an item is created trigger

  2. Add a row into a table action.

    Enter the Excel file location details and select the table. After selecting the table, you will see a list of all available table columns.

    For table columns that need to be updated, select the corresponding SharePoint columns.

    Add a row into a table

Update a row

Create a flow that triggers when a SharePoint item is modified and updates a row in the Excel table.

These are the flow steps:

Flow to update a row in the Excel table

  1. When an item or a file is modified trigger.

    Specify the SharePoint site address. Then select the SharePoint list name from a dropdown.

    When an item or a file is modified trigger

  1. Update a row action.

    Enter the Excel file location details and select the table. After selecting the table, you will see additional required parameters and a list of all available table columns.

    For the Key Column parameter, select the ID column from a dropdown. Add a SharePoint item ID from a Dynamic Content tab to the Key Value parameter.

    For table columns that need to be updated, select the corresponding SharePoint columns.

    Update a row

Delete a row

Create a flow that triggers when a SharePoint item is deleted and removes a row from the Excel table.

These are the flow steps:

Flow to remove a row from the Excel table

  1. When an item is deleted trigger.

    Specify the SharePoint site address. Then select the SharePoint list name from a dropdown.

    When an item is deleted trigger

  2. Delete a row action.

    Enter the Excel file location details and select the table. After selecting the table, you will see additional required parameters.

    For the Key Column parameter, select the ID column from a dropdown. Add a SharePoint item ID from a Dynamic Content tab to the Key Value parameter.

    Update a row