Forum Discussion

mumbaicharaja's avatar
mumbaicharaja
Regular Visitor
5 years ago

How to access onedrive shared folder from power query in excel

I have a shared folder on onedrive, which has many files in it.

 

I want to pick up each file and merge records from all of them together.

 

I also wish to grant permission on this folder to other user...and even he/she should be able to run same powerquery to merge the records from those files into one.

 

Sharepoint.folder option doesn't work for this. What option can be used to access the shared folder?

3 Replies

  • Yes, Sharepoint.Folder does work for this. Provide more information where it fails for you.

    • pravin108's avatar
      pravin108
      New Member
      I think I am stuck at: 1. User1's onedrive has following structure https://xyz.sharepoint.com/personal/user1_xyz/folder1/folder2/Source This source folder contains all the files to be merged, The powerQuery (PQ) de works all fine by going to first folder1, then folder2, and then Source...picks up all files one by oe and does the merge activity. 2. Usre2 is granted access to powerquery code. He is granted the access to folder "Source". Then when program tries to first go to folder1 it fails because USer2 doesn't have access to it. What I am looking for is 1. this folder traversing should be allowed for user2 without exposing him other contains of the folder. OR  2. when User1 shares the folder "Source", a URL is created. So in power quey, can I use this URL and directly jump to it so that even User2 will have smooth access to files in that folder?
      • lbendlin's avatar
        lbendlin
        Super User

        You hadn't mentioned that this is a personal sharepoint. Don't do that, use a group sharepoint.