Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Connectivity: connecting to Excel file: Sharepoint folder vs Web

Hi, 

 

I am working on a dsahboard that uses an Excel file stored on sharepoint as a database, and I was wondering about any experiences that would lead you to favor using the Sharepoint Folder connector or rather the Web connector in sharepoint.

To me it seems like web is sometimes a bit faster, but are there any large differences between the two that create advanages/disadvantages for either of them ?

 

Best, 

Julius

8 Replies

  • DataChant's avatar
    DataChant
    Most Valuable Professional

    Do you expect to load only a single Excel file from Share Point?

    If not, I would start with the Share Point Folder connector, apply a filter and load the specific files.

    If you have only one file and want a quick solution, keep using the Share Point Folder connector, and filter the folder to get the specific file, then apply drill down to import the Binary of the Excel file. Power Query will automatically identify that this is an Excel and will enable you to do the transformations on the Excel if needed.

     

    If you have some time and would like to do it more efficiently, I would use the Web Connector and get the file URL following these steps (I published it in detail in Chapter 8 of my book, Collect, Combine and Transform Data Using Power Query in Excel and Power BI).

     

    Step 1: Go to the Share Point folder and open the Excel file in your browser (Excel Online):

    Step 2: In Excel desktop, go to File tab and click on the file path. Then select Copy path to clipboard.

    Step 3: Now, in Power BI Desktop, select Get Data --> From Web and paste the path. Next, delete the suffix "?web=1"

    Hope it helps,

    Gil

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi DataChant / Gil, 

       

      I know how to use both of them, my question is rather if any of them have any benefits over the other one, so far the only difference i can really find is that going via the web connector could enable to move the file easier, but I am interested if there are any other benefits / drawback to using either of the connectors 🙂 

       

      And I am using 2 files, each with one table that gets refreshed every time, and one of the files contais 3 supporting tables, but they are only imported initilally as the value do not change.

       

      Best, 

      Julius

       

       

      • DataChant's avatar
        DataChant
        Most Valuable Professional

        Hi Julius,

         

        Are the two files with the same format? If so, I would use the Folder connector to make the solution robust to append similar tabs together. IN the future, if you have three files of the same format, you would not need to make any change to keep the query refreshing.

         

        The Share Point Folder option is slower because you first load folder details, and if you have many folders and files under the Share Point site, it can have an impact on the performance of the import. Nevertheless, I think that the impact is minimal compared to the sustainability you achieve with the folder approach, so I would go with the Folder approach.

    • AdamPorter's avatar
      AdamPorter
      New Member

      Hi, Apologies for bumping anold thread but I had a web.contents set-up like this which has suddenly stopped working and I cannot reinstate as it doesn't recognise it as an excel file. Do you have any idea why this may be? Has there been a change?

  • KNP's avatar
    KNP
    Super User

    Hi Julius,

     

    Did you come to any conclusions regarding web vs sharepoint?

    I'm wondering the same thing, only potential negative I can see with the Web.Contents method is when it comes to credentials on the service, e.g. SharePoint you set credentials once, Web for each call.

    I'm keen to hear your thoughts.


     

     

     

     

     

     

     

    Regards,

    Kim