How to Name Excel Tables Created by Office Scripts for Power Automate
Question details
The user needs to ensure an Excel table created by an Office Script has an explicit name so that a Power Automate flow can use that exact table name in the List rows present in a table action.

- Product
- Microsoft Excel with Office Scripts and Power Automate
- Device & OS
- not provided
- Scenario
- Creating a table in an Excel workbook with an Office Script and then consuming that table from a Power Automate flow.
- Observed behavior
- A range created by Office Scripts does not automatically use an assumed table name such as Table1, so the flow must reference the exact table name set in the workbook.
Confirm that you have edit access to the workbook in SharePoint or OneDrive and that the Power Automate flow uses the same workbook and file location that the Office Script will update.
Set an Explicit Table Name in the Office Script and Use the Same Name in Power Automate
Use this solution when a Power Automate flow must read rows from an Excel table created by Office Scripts and you need the table to have a predictable, exact name.
Office Scripts create a table when you add a table from a range, but the default table name is assigned by Excel and may not match the name Power Automate expects. Naming the table explicitly removes ambiguity and makes the flow resilient to default naming changes.
In Excel for the web, select Automate > New Script or open the existing script that creates the table.
After the line that adds the table, call table.setName("Table1"); using the exact name you want Power Automate to use. For example: let table = workbook.addTable(...); table.setName("Invoices");
Select Save script, then Run to create the table. In Excel, select a cell inside the table and check the Table Design tab to confirm the Table Name box shows the same name.
In Power Automate, add the List rows present in a table action, select the SharePoint site and workbook location, choose the correct Excel file, and enter the exact table name from the Office Script in the Table field.

Use WPS Office as a Free, Lightweight Alternative for Excel-Compatible Workbooks and Macros
Office Scripts and Power Automate are Microsoft 365 cloud automation features. WPS Office does not run those specific cloud workflows, but it is a free, lightweight Microsoft Office alternative that opens, edits, and saves Excel-compatible .xlsx workbooks with a familiar interface and built-in macro support for desktop spreadsheet tasks.
- 1. Download WPS Office: Go to the official WPS Office website and download the free installer for Windows, macOS, or mobile.
- 2. Open the Excel workbook: Launch WPS Office, open the .xlsx workbook from SharePoint, OneDrive, or local storage, and continue editing tables and formulas.
- 3. Use macro tools for desktop automation: If the workflow can be done locally, open the macro editor in WPS Office and reuse or record macros for spreadsheet automation.

Frequently Asked Questions
Does WPS Office support Office Scripts and Power Automate?
No. Office Scripts and Power Automate are Microsoft 365 cloud automation features. WPS Office can open and edit Excel-compatible workbooks, but it does not run Office Scripts or connect to Power Automate flows.
How do I check the exact table name in Excel before using Power Automate?
Select a cell inside the table, open the Table Design tab, and read the name shown in the Table Name box. In Office Scripts, set this name explicitly with table.setName("TableName").
Why does Power Automate not find my table even though I created a range?
A range is not a named table. You must create a table and assign it a specific name, then enter that exact name in the Power Automate List rows present in a table action.
Can I automate Excel tasks in WPS Office without Office Scripts?
Yes. WPS Office supports macro-enabled workbooks and provides macro tools for desktop automation, which can handle many local spreadsheet tasks without a Microsoft 365 subscription.




