SOLVED

Power Query/Sharepoint

Brass Contributor

Hello all, 

 

It appears I'm heading down familiar territory, but my question doesn't seem to have been specifically answered.

 

I notice this thread, amongst others.

 

I shall be looking at this thread, with an excellent answer from @Sergei Baklan as well.

 

So, to my issue. I have been using PQ to source data from a folder on my desktop. There's a report I can run from our client database, I drag and drop it in the folder, it updates the spreadsheet to do all the formatting, cleaning and date checking I need, job done.

 

Now I want to do the same, but using sharepoint, so that anyone in the particular sharepoint space can drag the same report into a sharepoint folder and then refresh the PQ. 

 

Similar to other threads: I can only get the folder linked using "from folder" and even if you link the sharepoint to your drive so it appears under "from folder" it is then back to only working for me and not others. 

 

Using any of the sharepoint specific options under "Get Data" leads to various errors around url names.

 

I'll post more details shortly, but any help greatly appreciated. 

9 Replies
best response confirmed by davidmaddock54 (Brass Contributor)
Solution

@davidmaddock54 

You may use From SharePoint Folder connector

image.png

using for the connection root site URL and filtering after that on desired folder. But that will be new project, From Folder connector is not mapped on SharePoint folder. At least directly.

Thanks. Yeah, that's the next step I can't work out. As you say, sharepoint folder only links to root site. Can you point me to a How to guide on that next step? Is it a matter of settings in sharepoint, user permissions, or a specific bit of coding?

@davidmaddock54 

Connecting to root one of the columns will be Folder path - filter on on folder you work with.

image.png

After filtering, expand content. Rest is similar as with From Folder connector.

Ok, got it up and running. Thank you. This solves one of the issues, but gets away from one of the main positives my original method had.

Using the regular folder method means the query works regardless of the file name. So as long as the report/columns match, and there's only one file in folder, the report will work as intended. (And if it's wrong, the errors are obvious, and you just put the right report in the folder and refresh.)

This method relies on the file name remaining identical. Not a deal breaker, but mildly annoying.

(Trying to find a solution for a lot of users with different capabilities to follow.)

@davidmaddock54 

Perhaps I misunderstood something, but you don't need filenames here as well. After you filter on SharePoint folder you may keep only Content column

image.png

After expand it you have same windows for combining files having first file as a sample

image.png

It;s entirely possible I misunderstood something. I'll have a further look and post screen grabs if I can. Thanks again.

@Sergei Baklan Thanks again for this, couldn't seem to use expand option for that column, but removing other columns and just keeping binary and folder path columns did the job.

 

 

Hi again folks. I think this has been answered before, but want to double check. I have had a spreadsheet working well using "from sharepoint folder" option, but now it's stopped working. I'm having trouble even getting in to see where the error lies in the process, but having just tried to recreate the spreadsheet I'm running into an issue which I think is pretty foundational.

The url I use is at a regional level, as you can't go into further subfolders with the url. But that creates an issue because when I go to Transform the data, the list of items/folders is over 1000, and the data I want is outside of that first 1000. Is there a way around this?

@davidmaddock54 

If you scroll down preview window shows you rows over 1000, the only that could take time

image.png

Profiling you also could change on entire data set and it also could be time consuming

image.png

But in general you don't need that for filtering. If you know folder path or its part you may filter column directly from the menu

image.png

it doesn't matter records selected by filter in first 1000 rows or not, that's only preview.

1 best response

Accepted Solutions
best response confirmed by davidmaddock54 (Brass Contributor)
Solution

@davidmaddock54 

You may use From SharePoint Folder connector

image.png

using for the connection root site URL and filtering after that on desired folder. But that will be new project, From Folder connector is not mapped on SharePoint folder. At least directly.

View solution in original post