Forum Discussion

sashaxp's avatar
sashaxp
Icon for Advocate I rankAdvocate I
6 years ago
Solved

Get all files from onedrive folder in an efficient way

Hi folks,   I've tried to get files from onedrive/sharepoint folder following articles like that:  https://powerbi.microsoft.com/en-us/blog/combining-excel-files-hosted-on-a-sharepoint-folder/ Co...
  • edhans's avatar
    6 years ago

    Yes. In the SOURCE line of the query, change SharePoint.Files("http://blahblah") to SharePoint.Contents("http://blahblah")

     

    You will be at the root of the sharepoint site. You'll have to navigate through to the desired folder, but the end result will ignore all other folders when your query runs.

  • edhans's avatar
    edhans
    6 years ago

    Change your source to this:

     

    Source = SharePoint.Contents("https://sharepoint_site_root_name", [ApiVersion = 15]),

     

    See if that helps.

     

    I'm not sure why it would take a long time to browse, unless the folder you are accessing has hundreds or thousands of files in that folder. It does have to load the full listing of the folder you ultimately get a file(s) from.