Reading multiple sheets from an excel file
I have an excel spreadsheet and the data is seperated into a different sheet for each year but I want to have all of the years worth of data in one table so I was wondering what the best way to approach this is? Right now my code only gets the data from 2007 and thats it.
opt=detectImportOptions(‘BC1 2007-2020.xlsx’);
opt.VariableTypes(3)={‘double’};
BC1=readtable(‘BC1 2007-2020.xlsx’,opt);
BC1.Date=datetime(BC1{:,1},’InputFormat’,’dd/MM/yy HH:mm:ss’);
BC1=table2timetable(BC1);
plot(BC1.Date,BC1.WaterLevel_Meters);I have an excel spreadsheet and the data is seperated into a different sheet for each year but I want to have all of the years worth of data in one table so I was wondering what the best way to approach this is? Right now my code only gets the data from 2007 and thats it.
opt=detectImportOptions(‘BC1 2007-2020.xlsx’);
opt.VariableTypes(3)={‘double’};
BC1=readtable(‘BC1 2007-2020.xlsx’,opt);
BC1.Date=datetime(BC1{:,1},’InputFormat’,’dd/MM/yy HH:mm:ss’);
BC1=table2timetable(BC1);
plot(BC1.Date,BC1.WaterLevel_Meters); I have an excel spreadsheet and the data is seperated into a different sheet for each year but I want to have all of the years worth of data in one table so I was wondering what the best way to approach this is? Right now my code only gets the data from 2007 and thats it.
opt=detectImportOptions(‘BC1 2007-2020.xlsx’);
opt.VariableTypes(3)={‘double’};
BC1=readtable(‘BC1 2007-2020.xlsx’,opt);
BC1.Date=datetime(BC1{:,1},’InputFormat’,’dd/MM/yy HH:mm:ss’);
BC1=table2timetable(BC1);
plot(BC1.Date,BC1.WaterLevel_Meters); excel MATLAB Answers — New Questions