This Power Automate tutorial will show us how to count rows in an Excel table using Power Automate with examples.
Scenario:
The flow triggers manually and uses the List rows in a table action to count rows in the Excel workbook.
Count rows in an Excel table using Power Automate
Let us see how to count rows in an Excel table using Power Automate flow.
In this example, we will use the below Employees Excel workbook, presented in the SharePoint online document library.
Step-1:
Select instant cloud flow, enter the flow name, choose the trigger as a manual trigger, and click the create option.
Step-2:
Select + new step and add a List rows present in a table action from action triggers; provide the below required fields:
- Location – Select the location where the Excel workbook exists
- Document Library – Choose the document library from the dropdown
- File – Select the Excel workbook from the show picker for which you want to count rows
- Table – Select the table name from the dropdown
Step-3:
Select the +New step, add a compose data operation, and pass the below expression to count the rows in the Excel table.
length(outputs('List_rows_present_in_a_table')?['body/value'])
Step-4:
Save and Run the flow by selecting the run flow option; We can see that the output of the compose data operation displays the rows count value.
Example:2
Similarly, we will use the below Customers Excel workbook to count rows in an Excel table using flow.
Follow Step 1, and in Step 2, Configure the required fields. Here I have selected my Customer’s workbook.
- Location – Select the location where the Excel workbook exists
- Document Library – Choose the document library from the dropdown
- File – Select the Excel workbook from the show picker for which you want to count rows
- Table – Select the table name from the dropdown
Now add a compose data operation and pass the below expression to count the rows presented in the excel table.
length(outputs('List_rows_present_in_a_table')?['body/value'])
Save and Run the flow by selecting the run flow option, and We can see that the output of the compose data operation displays the rows count value.
This is how to count rows in an Excel table using Power Automate flow.
In this Power Automate tutorial, we saw how to count rows in an Excel table using Power Automate with examples.
You may also like:
- How to delete all rows in Excel using Power Automate?
- How to find text in a string using Power Automate?
- Convert HTML to Text using Power Automate
- Export Power BI Report to Excel using Power Automate
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (9 times). I have also worked in companies like HP, TCS, KPIT, etc.