Why am I getting this error. If I run the exercise and don't open the 3.02 file the process works correctly, however, if I have the initial file open and use the Blank Query process =Excel.Workbook(File.Contents("C:UsersSteveOneDriveTrainingPractice Filespq_3.02.xlsx"))
I get this message
DataSource.Error: The process cannot access the file 'C:UsersSteveOneDriveTrainingPractice Filespq_3.02.xlsx' because it is being used by another process.
Details:
C:UsersSteveOneDriveTrainingPractice Filespq_3.02.xlsx
Hi Steve,
When using the Excel.Workbook function the source file must be closed for Power Query to access it.
Mynda
Hi Mynda, it would be useful if you pointed that out in the video exercise, as it appears that the file is open when you make the query. Paul
I'm confused. In the 3.02 exercise, we see the query run from an open workbook, and the data is inserted into a new sheet in the open workbook. I'm using Excel 365, and it doesn't work for me. I presume a custom query needs to be made using Excel.CurrentWorkbook() rather than Excel.Workbook(), but I can't work out the syntax. Could you offer some clarity on this? TIA. Paul
Hi Paul,
In an update to Excel you can no longer have the workbook open. You need to close the source file and get the data from a new blank workbook. I'm in the process or recording an updated course that will address this. For now there's a note under that lesson's video.
Please be sure to check under videos for important notes such as this.
Sorry for the hassle.
Mynda