cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
rsallaii
Level: Powered On

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
Community Support Team
Community Support Team

Re: Excel connector dynamic "file" value with static table name

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.

 

 

rsallaii
Level: Powered On

Re: Excel connector dynamic "file" value with static table name

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.

Community Support Team
Community Support Team

Re: Excel connector dynamic "file" value with static table name

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.

Super User
Super User

Re: Excel connector dynamic "file" value with static table name

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

rsallaii
Level: Powered On

Re: Excel connector dynamic "file" value with static table name

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?

Super User
Super User

Re: Excel connector dynamic "file" value with static table name

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
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,273)