Forum Discussion
Excel.CurrentWorkbook() crashes
Hi Bertuccio ,
Actually there is a little difference between Excel.Workbook() and Excel.CurrentWorkbook(), you can refer this blog which introduces it in details:
What is with Excel Tables and the Data Model
One big caveat is that Excel.Workbook() doesn't read from the current data set, it reads from the most recently saved copy of the file. If we use Power BI Desktop to connect to a local file, the query should be used Excel.Workbook() by default.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you, it's very informative. I've actually tried to do it this way, and get data from the document itself by doing Get Data-from Excel. Unfortunately for me, it appears using Office 365 makes this impossible as when I tried to load the Data I have the error message that this document is already in use. I am yet to find a way to bypass this
- BA_Pete4 years agoSuper User
Hi Bertuccio ,
For heavily-used Excel files, I would recommend looking into using Power Automate Flows to detect when the modified date of the file changes on SharePoint, then copy it to your own 'safe' location elsewhere on SharePoint.
This should ensure you always have the most recently-edited version of the file in a no-lock environment.
Pete