We will see how can we use Power Query (Get & Transform Data) to connect the Excel File from OneDrive and refresh it. Currently, Power Query hard code the file path in the source step when we get data from file/folder if the OneDrive is setup on your PC.
![Power Query File Path in formula bar](https://i0.wp.com/excelexciting.com/wp-content/uploads/2020/01/2020-01-22_17-49-56.png?resize=830%2C42&ssl=1)
If you share this workbook with another user and when they refresh Power Query they will be prompted with an error due to location not found.
![Power Query File Path Error](https://i0.wp.com/excelexciting.com/wp-content/uploads/2020/01/2020-01-22_17-57-09-1.png?resize=830%2C237&ssl=1)
Let us look the solution to make it work
Make sure you store the file to OneDrive.
![OneDrive File Attachment](https://i0.wp.com/excelexciting.com/wp-content/uploads/2020/01/2020-01-22_18-33-48.png?resize=830%2C245&ssl=1)
We need to extract the correct link to the source file.
Simply select the file and click download the file. Upon download, this will generate the download link which will be helpful for us to connect the data to Power Query
![Download File From OneDrive](https://i0.wp.com/excelexciting.com/wp-content/uploads/2020/01/Download-File-From-OneDrive.gif?resize=640%2C360&ssl=1)
Now open new Excel Workbook, Select Data Ribbon > Get & Transform Data > From Web and paste the link which we have copied.
![Load Data In Power Query To OneDrive](https://i0.wp.com/excelexciting.com/wp-content/uploads/2020/01/Load-Data-In-Power-Query-To-OneDrive.gif?resize=640%2C360&ssl=1)
Your Excel source file in OneDrive is now linked.
Note: This link is active only 24hr as far I have tested. After that, you need to generate a new link.
When you share this Query file, anyone can able to refresh the query without any issue.
When the user enters the new data, the new records will get the update. This also allows us to clean the data and add it to the Data Model. We will add a few records to the source file and refresh this Power Query file.
![Refresh Power Query OneDrive Excel Data](https://i0.wp.com/excelexciting.com/wp-content/uploads/2020/01/Refresh-Power-Query-OneDrive-Excel-Data.gif?resize=640%2C360&ssl=1)
Was the information helpful in this blog?
- If yes, hit that share button and show the excitement to the world.
- Subscribe to our free posts.
If no, please let us know what to improve.