How to load files(xls, xlsx, etc.) in the current directory to the workspace
조회 수: 14 (최근 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에서 Workspace Variables and MAT Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!