Reading Multiple sheets to different data sets

I was wondering if there was a faster or more concise way to import my data that what I currently have which is to use the readtable command to import each sheet as its own variable, and I cant use xlsread as that isnt importing the string values

댓글 수: 3

hello
it all depends what info you need from your sheets and what kind of data / strings / format we are talking about
readtable is nice and very versatile but slower than "focused" methods
if you could share a data file and explain in more details what you need, we might find a faster solution
tx
Aidan Roberjot
Aidan Roberjot 2020년 11월 23일
편집: Aidan Roberjot 2020년 11월 23일
heres one of the data files, thanks for the help
so currently my code looks like this for 20 lines, and i just cant imagine its the best way to go about it
data2019=readtable('2019_domestic_travel_data.xlsx','PreserveVariableNames',1);
data2018=readtable('2018_domestic_travel_data.xlsx','PreserveVariableNames',1);
data2017=readtable('2017_domestic_travel_data.xlsx','PreserveVariableNames',1);

댓글을 달려면 로그인하십시오.

답변 (1개)

Nora Khaled
Nora Khaled 2020년 11월 23일

0 개 추천

this may help
https://www.mathworks.com/matlabcentral/answers/300842-importing-data-from-excel-across-multiple-sheets-and-filenames

카테고리

도움말 센터File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

제품

릴리스

R2019b

질문:

2020년 11월 23일

답변:

2020년 11월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by