Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

How to Create & Fetch a Table in Excel Dynamically

Hello Everyone,


I am trying to create a flow that will:

1 - Create an excel file from an e-mail attachment when the e-mail arrives

2 - Create a table in the excel file created in step 1

3 - List the rows in the excel file from step 2 and do some processing


I am currently struggling with steps 2 & 3.


For step 2, how do I create a table dynamically based on the number of rows in the file?

ex.  I always have a file named the same way, the data is always in sheet1 and contains headers.

How would I create a table dynamically up until the last non-empty row?



I'm currently hard coding a range, which works but isn't efficient.





For step 3, how do I dynamically fetch the rows in an excel file?

List rows requires a table, which I created with the previous flow, but this does not seem to work with dynamic data. I must have the file with a table in advance in order to select "Table1" as Table value.



Since the filename and table are always the same I tried hardcoding the values but the flow always fails with the following error



I assume that even if hard coded and with the same file and table name the element still has a different ID which power automate does not find.


Is there a workaround?


Many thanks!





Helpful resources

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Users online (2,848)