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

6 ビュー (過去 30 日間)
Swathi
Swathi 2024 年 6 月 13 日
コメント済み: Cris LaPierre 2024 年 6 月 18 日
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);
  1 件のコメント
Swathi
Swathi 2024 年 6 月 13 日
still unable to read using the above code

サインインしてコメントする。


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.
Swathi
Swathi 2024 年 6 月 13 日
250x3. will try

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by