Unable to read the data in excel file from MATLAB online.

13 次查看(过去 30 天)
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 个评论
Cris LaPierre
Cris LaPierre 2024-6-18
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:

请先登录,再进行评论。

回答(2 个)

Shivani
Shivani 2024-6-13
编辑:Shivani 2024-6-13
Hello @Swathi,
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
Ganesh 2024-6-13
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 个评论
Ganesh
Ganesh 2024-6-13
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.

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by