12-17-2018 11:46 AM
12-17-2018 11:46 AM
I have an office 365 excel document that is synced up with a Microsoft survey form. I then have an offline excel file that I would like to read those survey responses in. The offline excel file is required because we need to run excel macros.
Is there a way to import the contents of an entire sheet from an Excel Online document into my offline excel file? I have looked through the Data > Get Data options, and I don't see anything that jumps out at me that could be of use. But I have not dealt with getting information from external sources that were not also located on the same computer. Please note, that the intent of all this is to send the excel file to other computers, but still maintain that connection to the Excel Online information.
12-17-2018 11:53 AM
12-17-2018 11:59 AM
I was already aware of the ability to edit the excel using native excel, however, the file is not a macro-enabled document. So I'm wondering if there is a way to avoid re-creating everything by just extracting the data I need from the excel online.
12-17-2018 12:44 PMSolution
From terminology point of view - there are no excel online files and excel native files. There are only excel files which you may access from Excel online web app (and in this case it shall be on OneDrive or Sharepoint) or from Excel desktop app.
Generated by Microsoft Forms file is on OneDrive by default, you may pick-up the table from that file (and transform as necessary) by Power Query using Excel desktop app from within the file located at any place. The only you need is the connection to you OneDrive. If you share that file with other people you also need to share the OneDrive file with these people to give them possibility to refresh the data.
12-17-2018 01:20 PM - edited 12-17-2018 01:23 PM
Understood. I believe the process you outline is what I followed (stumbled through) originally. I had both files saved on my OneDrive, and I added the data using Data > Get Data > From File > From Workbook. Everything works fine on the machine where I imported/linked that data. However, If I open that .xlsm file on another machine, or share it with another user, they cannot refresh the data because the source is not found.
Is there a way to use relative paths with the data source? When I open the .xlsm file on my other computer, with a different username, the source fails to load because the data source is using absolute paths, which points to my synced folder on OneDrive.
Is there a workaround for that? I apologize if I am understanding this concept incorrectly.
12-17-2018 02:12 PM
I believe I have solved my problem. I'm not sure if it was the proper way, but I was able to grant access to both myself on a different machine, and another user on his machine (using Office 2010 w/ the power query plugin). What I did:
1. Open Data > Queries & Connections
2. Right click my query and click edit.
3. In the power query editor window, click Advanced Editor
4. Modified the source parameter value to Excel.Workbook(Web.Contents("the sharepoint address of the file").
That seemed to work for me. Please let me know if there is a better way!
12-17-2018 02:13 PM
That's since your source is local folder synced with OneDrive. That shall be cloud part like
12-17-2018 02:17 PM
Yes, exactly, finally that will be Excel.Workbook(Web.Contents("https://...). But you may use From File->From Workbook connector if select cloud path instead of local one