How to load files(xls, xlsx, etc.) in the current directory to the workspace
11 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Arthur Roué
2020-8-4
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!