Can't open a range of a .csv excel file in Matlab online version
1 回表示 (過去 30 日間)
古いコメントを表示
Cyprien Nshimiyimana
2021 年 11 月 15 日
コメント済み: Cyprien Nshimiyimana
2021 年 11 月 15 日
I am using Matlab online version. It seems though that I can use the "xlsread" function to open a range of .csv excel file.
M = xlsread('ratings.csv','A2:C100837');
Error: Warning: Range cannot be used in 'basic' mode. The entire sheet will be loaded.
How can I solve this please?
1 件のコメント
Mathieu NOE
2021 年 11 月 15 日
hello
so what do you get if you load the entire sheet ?
can't you do the needed data extraction from there ?
採用された回答
Cris LaPierre
2021 年 11 月 15 日
編集済み: Cris LaPierre
2021 年 11 月 15 日
Basic mode means you are using xlsread without having access to Excel. That is the case with MATLAB Online, and is mentioned in the documentation:
" If your computer does not have Excel for Windows® or if you are using MATLAB® Online™, xlsread automatically operates in basic import mode".
"Range selection is not supported when reading XLS files in basic mode."
The soluion is to use one of the functions recommended at the top of the xlsread documentation page: readtable, readmatrix or readcell. If your data is all of the same data type, I would use readmatrix. Try this.
M = readmatrix("ratings.csv","Range",'A2:C100837');
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!