Can't open Excel files now that my company has upgraded to Office 365

22 views (last 30 days)
I have two problems reading .xlsx files with MATLAB. Both of these problems started after my company upgraded of MS Office 365 and started mirroring our files with OneDrive (Microsoft® Excel® for Microsoft 365 MSO (16.0.14326.20504) 32-bit ).
The first problem is that I can't open .xlsx files that are already open in Excel. My program used to be able to do this, but now I get a pop-up error message saying that the file is open in another application. This is true whether "Autosave" is on for that file or not. So it seems like Excel is somehow blocking MATLAB from opening the file in a way it wasn't before.
The second problem is that I can't open .xlsx files in MATLAB when I am not connected to a network, even if the file is NOT open in Excel. The files are on my local hard disk, and I can open them with Excel. But when I run my MATLAB program I get the following popup error message: "The network is not present or not started. Check that you are connected to the network and then try again." I don't understand why I need to be connected to the network to open a .xlsx file in MATLAB when I don't need to be connected to open it in Excel.
Any help on either issue would be appreciated. Thank you!

Accepted Answer

Ashutosh Singh Baghel
Ashutosh Singh Baghel on 18 Nov 2021
Hi Brian,
I understand you wish to open ".xlsx" file saved on OneDrive from MATLAB. But an error occurs. The issue is likely to be with OneDrive locking the file for editing purposes, although our development team is aware of the issue and investigating.
For now, the workaround is to close the application which uses the file in OneDrive, and then use MATLAB to load the file. Alternatively, the file can be moved or copied to a local directory, ensuring OneDrive does not lock it.
Refer to MATLAB Documentation page on 'readtable' and 'Compatibility Considerations'.
  1 Comment
Brian Cluggish
Brian Cluggish on 18 Nov 2021
Thanks! I tried moving the .xlsx file to a location on my hard drive that is not backed up to OneDrive. I can now read it with MATLAB while it is open in Excel.

Sign in to comment.

More Answers (0)




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!