Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Automatic reading of newly created .xlsm files

Hi folks,

is there a way to get only the latest .xlsm files if you use a folder as source. To understand the situation a little better, I want to read data from a test, for each product a new test is made and a new .xlsm file is created, after the test is finished the data is put together in one file. I already read this file into the report. But the test takes several days and I would like to have the latest data in Power Bi before the test is finished. So when a new .xlsm file is created, it should be read automatically and as soon as it is older than 2 weeks and is in the merged file anyway, it should be removed. (The .xlsm file always looks the same)

 

kind regards
Lukas

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You may upload the .xlsm files to SharePoint online, then use SharePoint folder to connect the data , use the URL below and use organizational account method.  In this way, the refresh synchronizes datasets and reports with their source files when publish to Power BI Service. See more: Connecting to Files in SharePoint & OneDrive with Power BI / Power Query.

 

https://xxxxx.sharepoint.com/sites/<sitename>

 

Best Regards,

Amy 

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You may upload the .xlsm files to SharePoint online, then use SharePoint folder to connect the data , use the URL below and use organizational account method.  In this way, the refresh synchronizes datasets and reports with their source files when publish to Power BI Service. See more: Connecting to Files in SharePoint & OneDrive with Power BI / Power Query.

 

https://xxxxx.sharepoint.com/sites/<sitename>

 

Best Regards,

Amy 

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , not sure .xlsm. But refer if this can help

https://medium.com/@wkrzywiec/getting-data-from-the-latest-file-in-a-folder-using-power-query-51dfa4bff711

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.