Unable to read the data in excel file from MATLAB online.
6 views (last 30 days)
Show older comments
CODE:
filename = '/MATLAB Drive/SvsT.xlsx';
data = readtable(filename);
ERROR:
Error using readtable (line 517)
Unable to find or open '/MATLAB Drive/SvsT.xlsx'. Check the path and filename or file permissions.
Error in SvsT1234 (line 8)
data = readtable(filename);
1 Comment
Cris LaPierre
on 18 Jun 2024
How did you upload the data to MATLAB Drive? Did you use MATLAB Drive Connector or did you drag and drop the file into your MATLAB Online current folder?
Try syncing your file using MATLAB Drive Connector or upload it directly into MATLAB Drive here:
Answers (2)
Shivani
on 13 Jun 2024
Edited: Shivani
on 13 Jun 2024
From what I understand, you may be encountering this error because you are trying to access a file from the MATLAB Drive directly through the path. You will need to use the 'matlabdrive' function to programatically open the file. You can refer to the MATLAB documentation for more details: https://www.mathworks.com/help/matlab/ref/matlabdrive.html
The code to open the file will look something like the following code snippet
filename = fullfile(matlabdrive,'SvsT.xlsx');
data = readtable(filename);
Ganesh
on 13 Jun 2024
If the "matlabdrive" path indeed points to "/MATLAB Drive/", it's possible that the issue with your file lies with permission. It is possible that it is saved as a "Read-Only" file.
Would suggest you to remove all file protections and then re-upload the file to "MATLAB Drive". In case the file is too large, ensure that the file is completely uploaded before you try to access it.
If you have MATLAB Access offline, then try to read the file locally to ensure the issue does not exist with the file.
4 Comments
Ganesh
on 13 Jun 2024
I tried uploading a large file through MATLAB Drive, and then accessing it in MATLAB Online, and alas, I am unable to do it. In fact, I am unable to see the file on the "Files" panel either. Instead, I tried to upload it by right-clicking on the "Files" panel and then uploading the file.
This seems to have worked.
The same does not happen with smaller ".xlsx" files.
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!