web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / When a file is created...
Power Automate
Unanswered

When a file is created or modified (properties only) - No worksheet selection

(0) ShareShare
ReportReport
Posted on by 28

Hi,

 

I am working on getting the latest Excel file in a subfolder of Shared Documents in Sharepoint. The path is like this: https://sharepoint.com/sites/Test/Shared%20Documents/pass

 

All the Excel files in the subfolder are named as Report_DDMMMYY format (I cannot make changes as the owner wants to keep it like this.) The Excel file has three worksheets. I just want to retrieve data from the first worksheet.

 

So far, only the 'List rows present in a table' action allows me to specify the worksheet. However, it becomes tedious since we have to give the specific link every time a new file comes into Sharepoint.

 

I wonder is there any way to get the data from the Excel file, like an action that can capture the last modified time while getting the first worksheet? 

 

And since this is not a Sharepoint List. I am unable to use any action that requires 'List Name'.

 

Desired action:

KooiJit_1-1701907030592.png

 

 

Current action that I use:

KooiJit_0-1701906881774.png

Any help is very much appreciated. Thank you.

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    on at

    Hi @KooiJit ,

     

     Using below method, you will be able to get the first table from dynamic Excel files:

    vjefferni_0-1701919944236.png

    first(outputs('Get_tables')?['body/value'])?['name']

     

    Best regards,

  • KooiJit Profile Picture
    28 on at

    Hi, @v-jefferni 

     

    Thanks for helping.

     

    I got an error at the 'Get tables' action. I suspect the error is caused by the trigger (first step) but I am not sure which part I should modify. 

     

    KooiJit_1-1701931009768.png

    Here are more details about my flow:

    KooiJit_2-1701931094020.pngKooiJit_3-1701931136192.png

     

     

     

  • v-jefferni Profile Picture
    on at

    Hi @KooiJit ,

     

    I tested it in new designer, and found that the Get tables action needs Identifier than Full path:

    vjefferni_0-1701932197415.png

     

    Best regards,

  • KooiJit Profile Picture
    28 on at

    Hi @v-jefferni 

     

    After changing to 'Identifier', it works. 

     

    But now it stopped at the 'List rows...' action

    KooiJit_0-1701933123386.png

    Here is the view of the 'List rows...' action

    KooiJit_1-1701933197951.png

    I wonder if it is because of the table function. I put it as: 

    first(outputs('Get_tables')?['body/value'])?['name']
    For the 'name', should I modify to worksheet name or action name? 
  • v-jefferni Profile Picture
    on at

    Hi @KooiJit ,

     

    I can run the flow successfully using the expression to get the first table in the Excel. This 'name' means the name of the first table in the workbook. Could you please expand the outputs of Get tables? I'm wondering if there's one table in that workbook.

     

    Best regards,

  • KooiJit Profile Picture
    28 on at

    Hi @v-jefferni 

     

    Here is the output of 'Get Table'

    KooiJit_1-1701934326485.png

    Cont.

    KooiJit_3-1701934379216.png

     

     

  • Verified answer
    v-jefferni Profile Picture
    on at

    Hi @KooiJit ,

     

    I tried id instead of name and it worked as well.

    first(outputs('Get_tables')?['body/value'])?['id']

     

    Maybe the names have been customized but cannot be recognized by Power Automate.

     

    Best regards,

  • KooiJit Profile Picture
    28 on at

    Hi @v-jefferni 

     

    Thank you so much for all the support!

    The flow is successful now.

     

    I have made two changes.

    The first one is I have modified the function as your suggestion: first(outputs('Get_tables')?['body/value'])?['id']

    The second one is the 'File'. I noticed in 'Get Table', that the Identifier has {}, but in 'List rows...', the identifier isn't shown as {Identifier} no matter how many times I click and refresh. So I choose {FullPath}. And somehow it just work!

    KooiJit_0-1701936266680.png

    Thanks for guiding me step by step. Thank you so much, sincerely. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard