February 8, 2020
I’ve spent hours researching this with no luck. If I am pulling data from a table within an Excel Workbook over to another Excel Workbook using Power BI, can I keep the source file open while refreshing? I always receive the data source error, file used by another program. I guess I have to close the workbook and then refresh? I’d like to keep both open as I enter data and refresh.
July 16, 2010
You didn't mention OneDrive initially. If you're referencing an Excel file on your hard drive it must be closed for refreshing. As for OneDrive, I haven't tested it enough to say. Did the changes get picked up by the refresh or is it still showing the previously sync'd data?
February 8, 2020
Correct, that's what I was able to figure out. I am pretty certain I was getting the original error because of the OneDrive sync client (i.e. the error was not be able to access the Data Source file because it was in use). Once I "paused" OneDrive, everything worked as it should.
Also, of note, there is a way to have this work and have OneDrive act as "normal." You can achieve this by having the Query point to the URL link of the OneDrive source file (vs. having the Query point directly to the Excel Workbook). However, if you are like me and live in an area where internet speeds are not good, the delay is too long to refresh. Doing above, cuts down the refresh time tremendously.
Answers Post
February 8, 2020
I am posting along this thread as it has to do with a refresh issue with a file not associated with OneDrive (i.e. the source data file is on the local drive but no sync with OneDrive; call this file "test.") and not working properly. Every time I refresh the main query, the "test" file cannot be resaved to the local drive; it has a "file sharing" message. If I close close the main query file, the source file works fine and can be saved. It's almost as if every refresh of the query is keeping that source file from being saved, generating the "file sharing" message. Any thoughts? I had no luck with Erik's solution above. Thanks.
February 8, 2020
Sorry, I made the mistake of "assuming" since talking about the same power query refreshing with another open file but good point. The source file is an Excel .xlsm file.
What is odd is that I've been able to make this work before with the source file open (and, does not matter, source file is local drive or OneDrive). For some reason, Excel is giving me the "file sharing" message within the source file while trying to save it after a refresh from the main file. I've been able to create new "test" files and it's working but I'd like to know how to fix going forward. I've tried all the basic stuff (indexing, sharing wizard checked, virus disabled, etc.).
1 Guest(s)