logo
search
SharePoint Document Issues

How to Update an Excel File in SharePoint with Power Automate Desktop

Olivia MillerOlivia Miller Oct 9, 2026 869 views

Question details

The user needs to run an on-premises SQL query and automatically write the results to an existing Excel workbook stored in a SharePoint library using Power Automate Desktop.

How to Update a SharePoint Excel File Using Power Automate
Product
Microsoft Excel, Power Automate Desktop
Device & OS
not provided
Scenario
Automating data export from an on-premises SQL server to a SharePoint-hosted Excel file for centralized data tracking and reporting.
Observed behavior
Power Automate Desktop natively handles local Excel files, but requires different approaches or community workarounds to successfully target and update SharePoint-hosted Excel files.
Before you start

Ensure you have the necessary permissions to access the target SharePoint document library and that an On-Premises Data Gateway is configured if you need to query local SQL databases.

Solution 1Recommended

Use Power Automate Cloud Flows (Recommended)

Since Power Automate Desktop is optimized for local automation, the most reliable way to update SharePoint-hosted workbooks is by using a Cloud Flow with the Excel Online (Business) connector.

Cloud flows natively integrate with SharePoint and Excel Online, making them much better suited for querying on-premises data (via a gateway) and writing it directly to a SharePoint document without relying on desktop UI automation.

1
Set up a Cloud Flow

Log into Power Automate in your web browser and create a new Automated or Scheduled Cloud Flow.

2
Query the SQL Database

Add the 'SQL Server' action, select 'Get rows' or 'Execute a SQL query', and connect to your on-premises database using your pre-configured data gateway.

3
Add Excel Online Action

Add the 'Add a row into a table' action under the 'Excel Online (Business)' connector.

4
Configure SharePoint Details

Select your SharePoint Site, Document Library, the specific Excel file, and the Table name where the SQL data should be inserted. Map the SQL columns to the Excel table columns.

Use Power Automate Cloud Flows (Recommended)
Table Requirement: The destination range in your SharePoint Excel file must be formatted as a Table (Ctrl+T) for the connector to recognize and update it.
Free Microsoft Office alternative

Easily Edit and Manage Spreadsheets with WPS Office

If you are managing complex data exports or simply looking for a cost-effective, high-performance suite for your spreadsheet tasks, WPS Office is a perfect choice. It provides powerful data processing capabilities with a familiar interface, helping you work seamlessly outside of automated flows.

  1. 1. Download and Install: Visit the official WPS website to download WPS Office Free and complete the quick installation process.
  2. 2. Open Your Workbooks: Launch WPS Spreadsheets and open any existing Excel files you exported from your SQL databases.
  3. 3. Analyze and Edit: Use the advanced formulas, pivot tables, and charting tools to analyze your data effortlessly.
Fully compatible with Microsoft Excel formats (.xlsx, .xls, .csv) with zero formatting loss.Lightweight installation and incredibly fast startup for smooth data processing.Familiar ribbon interface requires no learning curve for Microsoft Office users.Free to download and use with powerful built-in PDF tools and cloud synchronization.
microsoft office alternative - wps office

Frequently Asked Questions

Can Power Automate Desktop edit Excel files on SharePoint without syncing?

Power Automate Desktop is primarily designed for local automation. To directly interact with an Excel file on SharePoint without syncing it locally via OneDrive, it is highly recommended to use Power Automate Cloud flows utilizing the Excel Online (Business) connector.

Why does my flow fail to find the Excel table in SharePoint?

For Power Automate to write or read data dynamically from an Excel file in SharePoint, the target range must be formatted as an official Table. You can do this by opening the workbook, highlighting your data, and pressing Ctrl+T before running your flow.

How do I export SQL server data to Excel using Power Automate?

You can connect to your on-premises SQL server using an On-Premises Data Gateway. Use the 'Get rows' action in a Cloud flow to pull the data, then use a 'Apply to each' loop with the 'Add a row into a table' Excel action to write the SQL results into your SharePoint workbook.