Forum Discussion

Phishdawg's avatar
Phishdawg
Brass Contributor
Sep 07, 2023
Solved

Tables Called in Flow Not Found

I have an Excel workbook that is moved, by flow, from an Outlook in-box to a SharePoint library. The workbook has four sheets. I created four scripts, one for each sheet in the workbook. Eac...
  • NikolinoDE's avatar
    Sep 07, 2023

    Phishdawg 

    The error you are encountering in Power Automate (formerly known as Microsoft Flow) indicating that the table is "not found" typically occurs when the table name referenced in the 'List rows present in table' action doesn't match the actual table name in the Excel workbook. To resolve this issue, follow these steps:

    1. Check Table Names in Excel:
      • Open the Excel workbook that your script is modifying.
      • Make sure that the tables created by your scripts indeed have the names you expect (e.g., "Table1," "Table2," etc.).
    2. Explicitly Specify Table Names:
      • In your script, explicitly set the names of the tables you create using the addTable method. For example, you can modify your script like this:
    let Continuous_Tbl = workbook.addTable(selectedSheet.getRange("A1:AP25"), true);
    Continuous_Tbl.setName("Table1"); // Specify the table name explicitly
    Continuous_Tbl.setPredefinedTableStyle("TableStyleLight8");

    Make sure that the table names in your script match the actual table names in Excel.

    1. Use the Correct Table Names in Power Automate:
      • In your Power Automate flow, when using the 'List rows present in table' action, make sure you are providing the correct table name that matches the one specified in your script. If you explicitly named the table in your script (as shown in the previous step), use that name. If you didn't specify a name, use the default "Table1," "Table2," etc.
    2. Check SharePoint List Connections:
      • Ensure that your SharePoint list connections are correctly configured and that you are working with the right list.
    3. Test Incrementally:
      • To identify the specific step where the issue is occurring, try running your flow incrementally. For example, start by running just one 'Run Script' action and see if the table is created and named correctly. Then, add the 'List rows present in table' action and test it separately.
    4. Flow Debugging:
      • Use the built-in debugging capabilities of Power Automate to inspect variables and outputs at each step of your flow to identify where the issue is occurring.
    5. Flow Logging:
      • Add logging actions (e.g., 'Compose' actions with informative messages) at key points in your flow to help diagnose issues. This can provide more visibility into the flow's behavior.

    By carefully checking the table names in your Excel workbook and ensuring that they match the names referenced in your script and Power Automate, you should be able to resolve the "not found" error and successfully list rows present in the tables in your flow.

    My knowledge of this topic is limited, but I entered your question in various AI. The text and the steps are the result of various AI's put together.

     

    My answers are voluntary and without guarantee!

     

    Hope this will help you.

     

Resources