How to count rows in an Excel table using Power Automate?

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.

power automate count rows in excel table

Step-1:

Select instant cloud flow, enter the flow name, choose the trigger as a manual trigger, and click the create option.

power automate count rows in excel table example

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
Example to count rows in excel table using Power Autoamate

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'])
Example to count rows in excel table using the Power Autoamate

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.

count rows in excel table using Power Autoamate flow

Example:2

Similarly, we will use the below Customers Excel workbook to count rows in an Excel table using flow.

count rows in excel table using Power Autoamate

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
Example to count rows in excel table using Power Autoamate flow

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'])
Example to count rows in excel table using the Power Autoamate

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.

count rows in excel table using the Power Autoamate

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:

>