Power query, why can not connect to the sharepoint folder, can only connect to the site level?

ST 1 Reputation point
2021-06-02T09:42:22.673+00:00

I want to connect power query to the SharePoint folder, but I can only get to the top site level.
The function I used is EXCEL-DATA-GET DATA-GET DATA - FROM FILE-FROM SHAREPOINT FOLDER (I am using Microsoft 365 version)
Since there are thousands of files in the site, I would like to connect to a certain sub-folder.
My IT support told me he is not good at EXCEL, he can only see that it works if I connect to the site, and then filter the file name under the "File Path".

Currently I can only connect to the top level as below
https://xxxxxxx.sharepoint.com/sites/division name

But I want to connect to the sub-folder below the site level, example below
https://xxxxxxx.sharepoint.com/sites/division name/Register
https://xxxxxxx.sharepoint.com/sites/division name/Register/Reporting

Community Center Not monitored
{count} votes

2 answers

Sort by: Most helpful
  1. Lz._ 9,016 Reputation points
    2021-06-03T11:58:14.057+00:00

    @ST . Thanks for updating your case. I don't see how I could help further as I don't have access (and never did) to a SharePoint site :(. All I know is what I read here and there

    That said, the 7th pic. (pics. don't look the same but the process is the same) in SharePoint Folder clearly shows that when you use method Get Data > From File > From Sharepoint Folder, function SharePoint.Files is used:

    102121-fromsharepointfolder.png

    and the above picture is consistent with the "From Folder" in Miguel's article Connecting to Files in SharePoint & OneDrive with Power BI / Power Query
    Later in that article he says: You can use a function by the name of SharePoint.Contents which will give you a completely new experience which looks more like a way to navigate through your folders in the event that you have way too many files

    IMHO this is exactly what you need so I would recomment you follow Miguel's article and use the SharePoint.Contents function

    Hope this makes sense & helps

    1 person found this answer helpful.

  2. Lz._ 9,016 Reputation points
    2021-06-02T11:23:01.473+00:00

    Hi @ST

    I might shoot in the dark as you don't explain which method (actually Power Query function: SharePoint.Files vs SharePoint.Contents) you use. I can only suspect it's SharePoint.Files whilst SharePoint.Contents would probably be closer to what you expect

    Assuming my crystal ball works :) I would recommend you go through the 2nd part of Connecting to Files in SharePoint & OneDrive with Power BI / Power Query where the SharePoint.Contents experience is covered in details

    Hope this helps & if this doesn't help at all share more information please. Nice day...


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.