How to load files(xls, xlsx, etc.) in the current directory to the workspace
19 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
千惠 洪
am 4 Aug. 2020
Beantwortet: Arthur Roué
am 4 Aug. 2020
I have a file named dataset.xlsx and now I want to load it on my workspace instead of click the "import data" button. I tried to use the load method but it cannot work, and the error showed that "Error using load.Unable to read file 'dataset.xlsx'. Input must be a MAT-file or an ASCII file containing numeric data with same number of columns in each row"
load('dataset.xlsx');
0 Kommentare
Akzeptierte Antwort
Arthur Roué
am 4 Aug. 2020
load() function is for MAT file or ASCII file;
For Excel workbook, you can use readcell, readtable or readmatrix according to your data and output format.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Import and Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!