cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rsallaii
New Member

Excel connector dynamic "file" value with static table name

The below link explains how to set dynamic "file" value:

http://johnliu.net/blog/2019/5/workarounds-needed-to-use-the-excel-connector-in-microsoft-flow

 

However, we also need to use the action Get Tables. In the above link, the solution was to pick the first table.

 

What I can do if I want to get a specific table using its name?

 

I created a flow in which I use apply each to loop through all table names and used a condition to match the specific table name.

Isn't there a better solution that skips the apply each loop?

 

If we create a flow using "List Rows Present In a Table" and export .zip we can open the file "definition" and find the graphID for the table. Is there an easier way to also find the graphID of the table? If that is possible I would be able to list it in a table along with the file path.

 

Flow_1.PNGFlow_2.PNG

6 REPLIES 6
v-alzhan-msft
Community Support
Community Support

Hi @rsallaii ,

 

You could get the first table without the apply to each with the workflow definition language.

1.png

The expression to get the first table as below:

first(body('Get_tables')?['value'])

 

The expression to get the column value in the first table as below:

 

outputs('Compose')?['Name']

 

Best regards,

Alice       

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Hello! Thank you for your reply, but I don't want to get the first table..

 

I want to retrieve a specific table based on its name. For example, table 'Team members'.

The table could be or not in the first position.

Hi @rsallaii ,

 

Sorry for I'm afraid that there is no any way to achieve the requirement since Microsoft flow couldn't get the table name when it runs.

 

Best regards,

Alice       

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

HI @rsallaii and @v-alzhan-msft 

I created a template with a workaround for this issue. You can find the explanation and the template here:

https://manueltgomes.com/microsoft/flow/how-to-access-dynamic-path-excel/

 

Hope it helps you

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

Hello @manuelstgomes ! Thank you for sharing your template and tutorial!

 

However, my issue requires one more step.

 

After we retrieve all excel tables how can I access a specific table based on its name?

My solution so far is to loop all items in the output Jason from get tables with For Each clause and use an IF Clause within to proceed when the name matches.

Are you aware of something less complex than that?

Hi @rsallaii 

 

In the template, I have three steps for Excel. Pick the table one and return that in your JSON. Or, even if you get all, you can filter by the one you want before returning it.

 

If you want to paste here your Flow and I'll try to help you further.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (2,411)