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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
GuinabaPBI
Regular Visitor

How to get the latest file from a SharePoint folder

Hi all,

 

I am trying to get the latest file from a SharePoint folder, using the path below:

 

= SharePoint.Files("https://XXXX.sharepoint.com/:f:/r/sites/SCOperatingSystem/PlanningSpace/Supply%20Planning/00%20-%20D...", [ApiVersion = 15])

 

However, I am getting the following Error Msg:

 

DataFormat.Error: The input URL is invalid. Please provide a URL to the root of a SharePoint site, or to the service document or entity of its OData feed (with no query or fragment part).
Details:
https://XXXX.sharepoint.com/:f:/r/sites/SCOperatingSystem/PlanningSpace/Supply%20Planning/00%20-%20D...

 

If I use this path: https://XXXX.sharepoint.com/:f:/r/sites/SCOperatingSystem/PlanningSpace there is no issue but not sure how I can select the next folder: Supply Planning 

 

Cheers

 

 

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User
1 REPLY 1
amitchandak
Super User
Super User

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.