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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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