Get Data From OneDrive or SharePoint With Power Query

Download as pdf or txt
Download as pdf or txt
You are on page 1of 39

09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

My Online Training Hub

 SALE 20% Off All Courses - Ends May 16th (8pm PDT) See
Courses (http://myonlinetraininghub.com/courses)

Get Data from OneDrive or SharePoint with


Power Query

March 18, 2021 by Mynda Treacy


(https://www.myonlinetraininghub.com/author/mynda)
Nowadays many of us are saving our files to the cloud using OneDrive for
Business or SharePoint Online. Unfortunately, it’s not straight forward to get
data form OneDrive or SharePoint with Power Query, so in this tutorial I’m
going to step you through the three scenarios: getting data from an
individual file on OneDrive or SharePoint, getting data from a SharePoint
folder, and getting data from a SharePoint shared library.

Note: The SharePoint Folder connector is only available in Excel 2019 (or
later) Professional Plus and with a Microsoft 365 Apps for Enterprise license.
See this comment (https://www.myonlinetraininghub.com/get-data-from-
onedrive-or-sharepoint-with-power-query#comment-105131) for a possible
workaround if you don't have a compatible license.

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 1/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Table of Contents

1. Get Data from a Single File on OneDrive or SharePoint with Power


Query
2. Get Data from a Folder on OneDrive or SharePoint with Power Query
3. Get Data from a Shared Library on SharePoint with Power Query
4. Sharing Files with Power Query Connections to OneDrive or
SharePoint
5. More Power Query

Watch the Video

Get Data From SharePoint or OneDrive with Power Query - Demystified!

(https://www.youtube.com/c/MyOnlineTrainingHub?

YouTube
sub_confirmation=1) 999+

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 2/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Get Data from a Single File on OneDrive or SharePoint with Power Query

I’ll start with getting data from an individual file on OneDrive or SharePoint.
Either way the process is the same and it requires getting the file path, but not
the file path as you know it.

If you’re like me, you’ll have your OneDrive files synced to your hard drive.
You can see mine here in the file explorer:

If you try to copy a file’s path from here it will reference the copy of the file on
your hard drive, not the OneDrive/SharePoint file path.

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 3/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

The trick is to go to OneDrive or SharePoint online and open the file from
there in the Desktop App:

Then in Excel go to the File tab > Info and click the ‘Copy Path’ button:

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 4/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Now that you have the file path you can close the file and create a query in a
new Excel workbook using the From Web connector in Power BI or Excel
(shown below):

Paste the URL for the file into the dialog box, deleting the ?web=1 from the
end before pressing OK:

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 5/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

At the authentication dialog box choose Organizational Account and enter


your OneDrive or SharePoint logon credentials:

At the navigator dialog box, you can choose the sheet(s) or table(s) from the
list and then click Transform Data to load the data to the Query Editor where
you can perform further transformations before loading to Excel or the Data
Model:

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 6/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Get Data from a Folder on OneDrive or SharePoint with Power Query

Getting data from a folder on OneDrive or SharePoint requires a different


approach. First, we need the folder path, which you get from your browser. In
the image below I want to get data from the folder called
pq_2.05_excel_workbooks:

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 7/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

I simply copy the portion of the URL up to _layouts/15…, which you can see
highlighted in pink.

Then in Power BI or Excel (shown below) you want the From SharePoint
Folder connector:

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 8/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Paste in the URL and at the authentication dialog box choose Microsoft
Account and sign in with your SharePoint logon credentials:

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 9/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Next, you’ll see a list of the files on your SharePoint site. Click Transform data
to filter the list to the folder you want:

Filter the Folder Path column to only show files that are contained in the folder
you want. You can use Filter > Text Contains > to enter part of your folder path
string. e.g. my files are in a folder with this path:

Training/Training Content/ Syllabuses MOTH/Excel/Power


Query/Lessons/Practice Files/pq_2.05_excel_workbooks:

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 10/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

IMPORTANT: remember Power Query is case sensitive, so you must enter the
folder path exactly as it appears in SharePoint.

In the Power Query Editor, click the double down arrow on the Content column
to get the data from the files in the folder:

Choose the Table/Sheet that you want from each file, then click OK:

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 11/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

IMPORTANT: the sheet or table that you choose must have the same name in
each file you want to consolidate.

This will consolidate the data in each file into one table and from there you can
perform further transformations.

Get Data from a Shared Library on SharePoint with Power Query

Lastly, if you work with Shared Libraries in SharePoint Online then the process
is a hybrid of the first and second examples. You can see in the screenshot
below that I’m in our My Online Training Hub Team Site and I want to get the

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 12/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

data from the Example Data folder. You can see it’s a Shared Library from the
list on the left.

There are two ways you can get the URL for the shared library, one is to copy
the domain from the URL, but you need to remove the -my from the URL
before pasting it into Power Query.

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 13/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Alternatively, if you open one of the files in the folder in the desktop app…

And copy the path from the File tab > Info

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 14/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

You’ll notice the URL you get through this path does not include ‘-my’ so it’s
ready to use by selecting the path up to and including .sharepoint.com/ e.g.:

https://your_tenant.sharepoint.com/

Then in Power BI or Excel (shown below) you want the From SharePoint
Folder connector:

And the process from here is the same as the previous example.

Sharing Files with Power Query Connections to OneDrive or SharePoint

If you want to share files with other users you need to make sure they have
permission to access the file, folder or shared library.

You can do this by right-clicking the file, folder or library in OneDrive or


SharePoint > Share:

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 15/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Then in Power Query they’ll also need to enter their credentials. Power Query
will prompt them to edit their credentials when they open the query editor. As
shown below where you can see a yellow warning bar below the ribbon.
Alternatively they can edit them via the Data Source Settings on the Home
tab.

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 16/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Select the source from the list

Edit Permissions
Edit to switch to a different account

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 17/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Thanks

Big thanks to fellow Microsoft MVP, Wyn Hopkins for demystifying connecting
to OneDrive or SharePoint in his video here (https://www.youtube.com/watch?
v=igcCbKqtwrk).

Learn Power Query

Power Query not only transforms data, it can transform your work load with
significant efficiency gains. Check out this introduction to Power Query video
(https://www.myonlinetraininghub.com/introduction-to-power-query). And if
you're ready for more, sign up for my Power Query course
(https://www.myonlinetraininghub.com/excel-power-query-course).

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 18/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

(https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-
with-power-query)

AUTHOR

Mynda Treacy
myonlinetraini
uthor/mynda)
nghub.com/a
(https://www. (https://www.myonlinetraininghub.com/a
uthor/mynda)
Co-Founder / Owner at My Online Training Hub
(https://www.myonlinetraininghub.com)

(https://mvp.micr
CIMA qualified Accountant with over 25 years experience in roles
osoft.com/en-
such as Global IT Financial Controller for investment banking firms
us/PublicProfile/5
Barclays Capital and NatWest Markets.
000748)

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 19/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Mynda has been awarded Microsoft MVP


(https://mvp.microsoft.com/en-us/PublicProfile/5000748)
status every year since 2014 for her expertise and contributions to
educating people about Microsoft Excel.

Mynda teaches several courses here at MOTH including Excel


Expert (https://www.myonlinetraininghub.com/excel-expert-
upgrade), Excel Dashboards
(https://www.myonlinetraininghub.com/excel-dashboard-
course), Power BI
(https://www.myonlinetraininghub.com/power-bi-course),
Power Query (https://www.myonlinetraininghub.com/excel-
power-query-course) and Power Pivot
(https://www.myonlinetraininghub.com/power-pivot-course).

More Power Query Posts

(https://www.myonlinetraininghub.com/import-data-

from-web-to-excel)

Import Data From Web to Excel


(https://www.myonlinetraininghub.com/import-data-from-web-to-
excel)
We now have a new, improved way to import data from the web to Excel.

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 20/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

AI can now auto-detect tables and import them to your Excel workbook.

(https://www.myonlinetraininghub.com/get-started-

with-power-query)

Get Started with Power Query


(https://www.myonlinetraininghub.com/get-started-with-power-
query)
10x Productivity with Excel Power Query in 3 easy steps. Get data >
Transform Data > Load Data = HOURS Saved!

(https://www.myonlinetraininghub.com/power-query-if-

statements)

Power Query if Statements incl. Nested ifs, if or, if and


(https://www.myonlinetraininghub.com/power-query-if-statements)
How to write Power Query if statements, including nested if, ‘if or’ and ‘if

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 21/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

and’, which are easier to write than their Excel counterparts.

(https://www.myonlinetraininghub.com/power-query-

variables-3-ways)

Power Query Variables 3 Ways


(https://www.myonlinetraininghub.com/power-query-variables-3-
ways)
Power Query Variables enable you to create parameters that can be used
repeatedly and they’re easily updated as they’re stored in one place.

(https://www.myonlinetraininghub.com/remove-blank-

rows-and-columns-from-tables-in-power-query)

Remove Blank Rows and Columns from Tables in Power Query


(https://www.myonlinetraininghub.com/remove-blank-rows-and-
columns-from-tables-in-power-query)
Delete blank rows and columns from tables using Power Query. Even

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 22/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

rows/columns with spaces, empty strings or non-printing whitespace

(https://www.myonlinetraininghub.com/extracting-

data-from-lists-and-records-in-power-query)

Extracting Data from Nested Lists and Records in Power Query


(https://www.myonlinetraininghub.com/extracting-data-from-lists-
and-records-in-power-query)
Learn how to extract data from lists and records in Power Query,
including examples where these data structures are nested inside each
other.

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 23/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

(https://www.myonlinetraininghub.com/combine-

files-with-different-column-names-in-power-query)

Combine Files With Different Column Names in Power Query


(https://www.myonlinetraininghub.com/combine-files-with-different-
column-names-in-power-query)
Learn how to load data into Power Query when the column names in your
data don't match up. Sample files to download.

(https://www.myonlinetraininghub.com/power-query-

keyboard-shortcuts-to-save-time)

Power Query Keyboard Shortcuts to Save Time


(https://www.myonlinetraininghub.com/power-query-keyboard-
shortcuts-to-save-time)
Time saving keyboard shortcuts for Power Query that work in both Excel
and Power BI. Download the free Shortcuts eBook

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 24/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

(https://www.myonlinetraininghub.com/remove-text-

between-delimiters-power-query)

Remove Text Between Delimiters – Power Query


(https://www.myonlinetraininghub.com/remove-text-between-
delimiters-power-query)
Remove all occurrences of text between delimiters. There's no in-built
Power Query function to do this, but this code does.

(https://www.myonlinetraininghub.com/tips-for-using-

the-power-query-advanced-editor)

Tips for Using The Power Query Advanced Editor


(https://www.myonlinetraininghub.com/tips-for-using-the-power-
query-advanced-editor)
Tips for using the Power Query Advanced Editor in Excel and Power BI.
Watch the video to see these tips in action

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 25/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Category: Power Query


(https://www.myonlinetraininghub.com/category/power-query)

Converting Decimal
Change Type Using
Time to Days, Hours,
Locale with Power
Minutes, Seconds in
Query
Power BI

Comments
(https://www.myonlinetraininghub.com (https://www.myonlinetraininghub.com
/converting-decimal-time-to-days-
Carlos E Olvera /change-type-using-locale-with-
hours-minutes-in-power-bi) power-query)
October 26, 2023 at 5:15 am (https://www.myonlinetraininghub.com/get-data-from-
onedrive-or-sharepoint-with-power-query#comment-105132)
Hello Mynda,

I have an issue I can’t solve, and hopefully you can help me.

I can connect to a company’s SP site that has folders for every area and as a result I get a
table with ALL the files in that SP. The list is big, and it will only get bigger with time. I tried
making the path longer to include the folder, but any attempt results in an error.

I could filter the results in the path column depending on the area I need (ie sales) but see
two potential problems:
1. As the size increases, will it make it slower?
2. Regarding security, will this show files to those that don’t have access, or will they only
see the files they have permission?

What would be your recommendation?

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 26/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Reply

Mynda Treacy

October 26, 2023 at 9:13 am (https://www.myonlinetraininghub.com/get-data-from-


onedrive-or-sharepoint-with-power-query#comment-105139)
Hi Carlos,

I haven’t tested if the query gets slower as the SP list increases. PQ only brings in a
sample of the data/list, so in theory, it shouldn’t make a big difference assuming you filter
out what you don’t need before Close & Load.

Regarding security, I’m not sure but even if it shows the file names, it won’t load the data
because you don’t have permission.

Mynda

Reply

Brandon Harrison

September 26, 2023 at 11:00 pm (https://www.myonlinetraininghub.com/get-data-from-


onedrive-or-sharepoint-with-power-query#comment-104784)
Hi,
After getting my Office version upgraded, I am unable to get the SharePoint connector to
see any folders (https://companypl.sharepoint.com/ (https://companypl.sharepoint.com/)). I
can get it to find personal OneDrive / Sharepoint folders, but not those on the company
SharePoint site I created and am owner. Other Excel files created with Power Query
references to specific files are in the same location and can be used by others.
Are there specific rights that must be allocated in SharePoint to allow shared folders to
work in PQ?

Thanks

Reply

Mynda Treacy

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 27/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

September 27, 2023 at 10:24 am (https://www.myonlinetraininghub.com/get-data-from-


onedrive-or-sharepoint-with-power-query#comment-104791)
I wonder if you’re logged into Excel with the wrong account. Try logging in with your
company 365 account that matches the company SharePoint.

Reply

Brandon Harrison

September 27, 2023 at 10:38 pm (https://www.myonlinetraininghub.com/get-data-from-


onedrive-or-sharepoint-with-power-query#comment-104797)
Hi Mynda,

I’m logged in with the correct credentials. If I put the SharePoint root URL for the company
SharePoint site, then the “Folder Path” shows all null values.

This is a Teams SharePoint folder. Will that make any difference?

Interestingly, if I use the “From Web” process to connect to a single file in the folder that I
want access to for all the files, then it works fine. Its just not allowing me to connect using
the SharePoint Folder Connector.

Any ideas on why?

Reply

Mynda Treacy

September 28, 2023 at 8:48 am (https://www.myonlinetraininghub.com/get-data-from-


onedrive-or-sharepoint-with-power-query#comment-104808)
Interesting, Brandon. Maybe it has something to do with the authentication process. When
you connect using ‘From Web’ are you seeing all the folders, or are you only able to
connect to a single file?

Reply

Brandon Harrison

September 29, 2023 at 12:03 am (https://www.myonlinetraininghub.com/get-data-from-


onedrive-or-sharepoint-with-power-query#comment-104814)

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 28/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Hi Mynda,
I see all files in the folder.

Mynda Treacy

September 29, 2023 at 8:14 am (https://www.myonlinetraininghub.com/get-data-from-


onedrive-or-sharepoint-with-power-query#comment-104818)
Thanks for confirming. I suspect something has changed since I wrote this post. I’ll have
to test at my end to see if I get the same results.

pgSystemTester

August 4, 2023 at 3:05 am (https://www.myonlinetraininghub.com/get-data-from-onedrive-


or-sharepoint-with-power-query#comment-103478)
Unbelievably how unintuitive Microsoft makes this process. Thanks for simplifying.

Reply

Mynda Treacy

August 4, 2023 at 9:34 am (https://www.myonlinetraininghub.com/get-data-from-onedrive-


or-sharepoint-with-power-query#comment-103497)
Glad we can help

Reply

Leslie

August 25, 2022 at 12:53 am (https://www.myonlinetraininghub.com/get-data-from-


onedrive-or-sharepoint-with-power-query#comment-96837)
Thanks for your video, I have tried this, when I try to apply the filter and find the documents
I need i dont have any luck, keeps showing error, can this be because there are too many
documents saved at this sare?
How can I find my documents to finish the query
Thanks

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 29/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Reply

Mynda Treacy

August 25, 2022 at 8:43 am (https://www.myonlinetraininghub.com/get-data-from-


onedrive-or-sharepoint-with-power-query#comment-96842)
Hard to say without seeing the files etc. Try troubleshooting with a smaller dataset to see if
that’s the problem. Create a test folder with two files.

Reply

Tamer

July 4, 2022 at 12:29 am (https://www.myonlinetraininghub.com/get-data-from-onedrive-or-


sharepoint-with-power-query#comment-96023)
Hi,
have a good day
After saving a file in OneDrive to the local computer with the macro code;
When I want to open the recorded file, as in the attached image:
I get the error message “The file format or extension is not valid……….”

How can we save a file in the link below to the local computer?
Link: https://onedrive.live.com/view.aspx (https://onedrive.live.com/view.aspx)?
resid=1376F399A4120875!1937&ithint=file%2cxlsx&authkey=!Ag3bU1cS7sd7Xko

thanks in advance
Best

Reply

Mynda Treacy

July 4, 2022 at 9:20 am (https://www.myonlinetraininghub.com/get-data-from-onedrive-or-


sharepoint-with-power-query#comment-96031)
Hi Tamer, If you want to save your OneDrive files on your local drive, you should use the O
neDrive sync tool (https://support.microsoft.com/en-au/office/sync-onedrive-files-and-folder
s-3b8246e0-cc3c-4ae7-b4e1-4b4b37d27f68).

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 30/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Reply

lookrider

April 27, 2022 at 7:25 pm (https://www.myonlinetraininghub.com/get-data-from-onedrive-


or-sharepoint-with-power-query#comment-94634)
Hi Mynda,

“Note: The SharePoint Folder connector is only available in Excel 2019 Professional Plus
and with a Microsoft 365 Apps for Enterprise license.”

I guess this means that if I have a normal Microsoft 365 licence, I can’t use this function?
I have also seen that when I copy the OneDrive link, it points to a “https://d.docs.live.net
…” address

Reply

Mynda Treacy

April 27, 2022 at 7:30 pm (https://www.myonlinetraininghub.com/get-data-from-onedrive-


or-sharepoint-with-power-query#comment-94635)
Not unless you have the Apps for Enterprise 365 license. I’d check your version though
just in case something has changed.

Reply

Carlos E Olvera

October 26, 2023 at 5:00 am (https://www.myonlinetraininghub.com/get-data-from-


onedrive-or-sharepoint-with-power-query#comment-105131)
You can, but you need to do it manually:

1. Create a new blank query


2. Write in the formula bar (fx):
= SharePoint.Files(“https://yoursharepoint.sharepoint.com/sites/YourSite”,[ApiVersion =
15])
3. Input your credentials that give you access to the site

This will access all the contents of the site

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 31/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Reply

Mynda Treacy

October 26, 2023 at 9:09 am (https://www.myonlinetraininghub.com/get-data-from-


onedrive-or-sharepoint-with-power-query#comment-105138)
Good to know, Carlos. Thanks for sharing

Reply

Brian

April 13, 2022 at 4:05 am (https://www.myonlinetraininghub.com/get-data-from-onedrive-


or-sharepoint-with-power-query#comment-94454)
How do I get a AccessDB link if there is no way to Open an Access file in App option? The
Access files only allow download to desktop which isn’t the SP moth.my link.

Reply

Mynda Treacy

April 13, 2022 at 9:37 am (https://www.myonlinetraininghub.com/get-data-from-onedrive-


or-sharepoint-with-power-query#comment-94459)
Hi Brian, have you tried using the Get Data > From Web connector?

Reply

H S Kalsi

March 9, 2022 at 1:19 pm (https://www.myonlinetraininghub.com/get-data-from-onedrive-


or-sharepoint-with-power-query#comment-94048)
i tried all the suggested methods but i am unable to get the excel file from SharePoint to
Power BI.

Reply

Lukasz

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 32/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

November 22, 2021 at 10:02 pm (https://www.myonlinetraininghub.com/get-data-from-


onedrive-or-sharepoint-with-power-query#comment-89929)
Hi Mynda,

I noticed quite strange behaviour loading data from SharePoint. I’ve recreated my local
folders the same way I have them on my local drive. However, when I use connection to
Sharepoint Excel doesn’t pull all of the data. I’ve noticed it on 20k lines Excel files. So, I
have 3 very similar files. On my local version when I combine and remove duplicates I get
25,021 lines. However, using the same technique with Sharepoint folder 3,715 lines.

I guess that loading the connect from Share point it limits it to 2,000 lines. So, what I get is
only a part of new data. Do you know how to get all of the data when loading from
Sharepoint? The alternative option would be to split the files under the limit and then
upload them to Sharepoint.

Kind regards,
Lukasz

Reply

Mynda Treacy

November 23, 2021 at 11:34 am (https://www.myonlinetraininghub.com/get-data-from-


onedrive-or-sharepoint-with-power-query#comment-89938)
I’m not aware of any limit loading data from SharePoint. It should get all of the data. Maybe
there’s a delay in syncing the data from your local drive to the file on SharePoint?

Reply

Roshan Matooreah

July 30, 2021 at 12:26 am (https://www.myonlinetraininghub.com/get-data-from-onedrive-


or-sharepoint-with-power-query#comment-88165)
Hi , I am Roshan from Mauritius , i wanted to know , how do i publish or share a powery
query report but only the report and it should be dynamic , when my manager opens it

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 33/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Reply

Mynda Treacy

July 30, 2021 at 8:47 pm (https://www.myonlinetraininghub.com/get-data-from-onedrive-or-


sharepoint-with-power-query#comment-88179)
Hi Roshan,

Power Query doesn’t return reports as such. Power Query returns a dataset from which
you can create a report. For more on automatic refresh, see this tutorial: https://www.myon
linetraininghub.com/auto-refresh-pivottables (https://www.myonlinetraininghub.com/auto-re
fresh-pivottables)

Mynda

Reply

Beth

June 30, 2021 at 1:14 am (https://www.myonlinetraininghub.com/get-data-from-onedrive-


or-sharepoint-with-power-query#comment-87820)
I have a SP library with several folders and custom columns. I’m attempting to get the files
and custom columns from this library using your approach in Get Data from a Folder on
OneDrive or SharePoint with Power Query section. I chose transform data and add a filter
query on Folder Path. My query is = Table.SelectRows(Source, each Text.Contains([Folder
Path], “CODQ Archive”)). The top row points to a Word .docx file. When I click the Content
double-down arrows, it evaluates for several minutes and then I receive a message:
Combine Files We didn’t recognize the format of your first file
(mycompanyname.sharepoint.com). Please filter the list of files so it contains only
supported types (Text, CSV, Excel workbooks, etc.) and try again.

So I removed that Word doc. The rest of the files are mostly PDF. Again I click Content
double-down arrows. Power Query evaluates for awhile. Then I received a message:
Connecting. Please wait while we establish a connection to PDF. After that’s complete, the
Combine Files screen shows Display Options > Parameter1 [4] Page (001-004). There is
no data in them when I select the pages. Table and sheet are not even listed under this.

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 34/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

I’m not sure if I’m doing something wrong or if what I’ve trying to achieve is possible.
Please adivse. Thank you.

Reply

Mynda Treacy

June 30, 2021 at 9:46 am (https://www.myonlinetraininghub.com/get-data-from-onedrive-


or-sharepoint-with-power-query#comment-87826)
Hi Beth,

Try saving the PDF file to your desktop and use the Get Data > From File > PDF connector
to rule out that it’s not the file that’s the problem.

Mynda

Reply

Samuel

June 26, 2021 at 3:34 pm (https://www.myonlinetraininghub.com/get-data-from-onedrive-


or-sharepoint-with-power-query#comment-87772)
Great post, Mynda. Thank you.

Does this work for OneDrive Personal?

Reply

Mynda Treacy

June 26, 2021 at 3:43 pm (https://www.myonlinetraininghub.com/get-data-from-onedrive-


or-sharepoint-with-power-query#comment-87773)
Hi Samuel, no, as per the first sentence, it’s only available with OneDrive for Business,
sorry.

Reply

Chris

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 35/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

May 17, 2021 at 6:24 am (https://www.myonlinetraininghub.com/get-data-from-onedrive-or-


sharepoint-with-power-query#comment-86681)
I found this post very helpful after trying PowerQuery for the first time. The worksheet and
Powerquery were to be used by my team and the files were kept on a Sharepoint folder.
Everything worked fine when I built the sheet but it failed when others tried using it. So the
solution you’ve detailed (for SharePoint shared folders) was just what the doctor ordered.
However, when I trying \Data\Get Data\From File I couldn’t find the SharePoint options. I
think (?) this is a licensing issue; the Microsoft 365 Business Premium license we use
doesn’t have this feature 🙁

Reply

Mynda Treacy

May 17, 2021 at 8:48 am (https://www.myonlinetraininghub.com/get-data-from-onedrive-


or-sharepoint-with-power-query#comment-86682)
Hi Chris,

Yes, unfortunately this is a licensing limitation 🙁 The SharePoint connectors are available
in 365 Apps for Enterprise or the Office 2019 standalone licenses.

Mynda

Reply

Blog Categories

AI in Excel (https://www.myonlinetraininghub.com/category/ai-in-excel)
Excel (https://www.myonlinetraininghub.com/category/excel)
Excel Charts (https://www.myonlinetraininghub.com/category/excel-charts)
Excel Dashboard (https://www.myonlinetraininghub.com/category/excel-
dashboard)
Excel Formulas (https://www.myonlinetraininghub.com/category/excel-formulas-
and-functions)

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 36/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Excel Office Scripts (https://www.myonlinetraininghub.com/category/excel-office-


scripts)
Excel PivotTables (https://www.myonlinetraininghub.com/category/excel-
pivottables)
Excel Shortcuts (https://www.myonlinetraininghub.com/category/excel-shortcuts)
Excel VBA (https://www.myonlinetraininghub.com/category/excel-vba)
General Tips (https://www.myonlinetraininghub.com/category/general-tips)
Online Training (https://www.myonlinetraininghub.com/category/online-training)
Outlook (https://www.myonlinetraininghub.com/category/outlook)
Power Apps (https://www.myonlinetraininghub.com/category/power-apps)
Power Automate (https://www.myonlinetraininghub.com/category/power-
automate)
Power BI (https://www.myonlinetraininghub.com/category/power-bi)
Power Pivot (https://www.myonlinetraininghub.com/category/power-pivot)
Power Query (https://www.myonlinetraininghub.com/category/power-query)
Word (https://www.myonlinetraininghub.com/category/word)

(https://mvp.microsoft.com/en-

us/PublicProfile/5000748)

(https://www.trustpilot.com/review/www.myonlinetraininghub.com)

(https://monitor20.sucuri.net/verify.php?

r=238d919b8ae7a94986fd22b61703437c3be0984f60)

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 37/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

(https://www.youtube.com/@MyOnlineTrainingHub)

(https://www.linkedin.com/in/myndatreacy/)

(https://www.instagram.com/mynda.treacy/)

(https://twitter.com/OnlineTrainingH)

(https://www.pinterest.com.au/myndatreacy/)

(https://www.facebook.com/MyOnlineTrainingHub)

Sign up to our newsletter (https://www.myonlinetraininghub.com/excel-newsletter-


sign-up) and join over 400,000
others who learn Excel and Power BI with us.

Company

About My Online Training Hub (https://www.myonlinetraininghub.com/about)


Disclosure Statement (https://www.myonlinetraininghub.com/disclosure-
statement)
Frequently Asked Questions (https://www.myonlinetraininghub.com/faqs)
Guarantee (https://www.myonlinetraininghub.com/guarantee)
Privacy Policy (https://www.myonlinetraininghub.com/privacy-policy)
Terms & Conditions (https://www.myonlinetraininghub.com/terms-conditions)
Testimonials (https://www.myonlinetraininghub.com/testimonials)
Become an Affiliate (https://www.mothresource.com/idevaffiliate/index.php)
Sponsor Our Newsletter (https://www.paved.com/sites/my-online-training-hub)

Support

Contact (https://www.myonlinetraininghub.com/contact-us)
Forum (https://www.myonlinetraininghub.com/excel-forum)
Helpdesk – For Technical Issues (https://www.myonlinetraininghub.com/help-
desk)

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 38/39
09/05/24, 17:25 Get Data from OneDrive or SharePoint with Power Query • My Online Training Hub

Copyright © 2024 · My Online Training Hub (https://www.myonlinetraininghub.com) · All Rights Reserved. Microsoft and the Microsoft Office
logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos,
brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.

Aggiorna le impostazioni sulla privacy

https://www.myonlinetraininghub.com/get-data-from-onedrive-or-sharepoint-with-power-query 39/39

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy