How to Add an Excel Table Total Row with Power Automate
Question details
The user needs to add a total row to an Excel table and sum specific columns using Microsoft Power Automate.

- Product
- Microsoft Excel, Power Automate
- Device & OS
- not provided
- Scenario
- Automating the addition of a total row and calculating sums for selected columns in an Excel table via a cloud flow.
- Observed behavior
- Seeking the correct logic, Office Scripts, or flow actions to successfully automate this table summary task.
Ensure your Excel file is saved in OneDrive for Business or SharePoint so Power Automate can access it, and verify your data is properly formatted as an official Excel Table.
Use an Office Script with Power Automate
Since standard Power Automate actions do not directly toggle a total row, combining the flow with a custom Office Script is the most effective approach.
Power Automate's native Excel connectors primarily handle adding, updating, or deleting rows. To manipulate table properties like the Total Row, you must write a script in Excel on the web and trigger it from your flow.
Open your workbook in Excel on the web, navigate to the Automate tab, and select New Script. Write a TypeScript snippet to toggle the total row on your target table.
Log into Power Automate, create a new flow with your desired trigger, and add a new action.
Search for the 'Excel Online (Business)' connector and select the 'Run script' action.
Select the location, document library, and file path of your Excel workbook, then choose the script you created in the first step to run automatically.

Consult the Microsoft Power Automate Community
If your flow requires complex dynamic ranges or advanced logic, seek help from dedicated automation experts and Microsoft engineers.
Need a simpler way to manage spreadsheets? Try WPS Office
While Power Automate handles complex cloud workflows for Microsoft Office, WPS Office offers a lightweight, free alternative for everyday spreadsheet tasks. Easily manage data, toggle total rows instantly, and enjoy high compatibility with Microsoft Excel formats without the heavy subscription fees.
- 1. Download WPS Office: Install WPS Office for free from the official website and open WPS Spreadsheet.
- 2. Open your Excel file: Open your existing .xlsx or .xls file directly in WPS Spreadsheet with full formatting preserved.
- 3. Enable the Total Row: Select your table, navigate to the Table Tools tab, and check the 'Total Row' box to instantly sum your columns.

Frequently Asked Questions
Can Power Automate natively add a Total Row without Office Scripts?
Currently, standard Excel Online actions in Power Automate do not have a direct toggle for the Total Row. You typically need to use the 'Run script' action with a custom Office Script to modify structural table properties.
How do I create an Office Script to sum columns?
Open Excel on the web, go to the Automate tab, and select New Script. You can write TypeScript code to get the table object, toggle the total row, and set the summary function (like SUM or AVERAGE) for specific columns.
Where can I find my Power Automate run history to debug my Excel flow?
In Power Automate, go to 'My flows', select your specific flow, and check the '28-day run history' section to see detailed inputs and outputs for your Excel actions and script executions.




