how to check whether a sheet exists or not, while using readtable function
21 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
rawData = readtable('filepath.xls','Sheet','Data Export')
in the above command, if sheet is not available then its throwing an error.
Error using readtable (line 216)
Sheet name 'Data Export' does not exist or is not supported. To check if the sheet is supported, specify the sheet by its worksheet index.
So i would like to skip this error and proceed further without using 'xlsfinfo'. if possible help me out please.
0 Kommentare
Antworten (1)
Jeremy Hughes
am 3 Mär. 2020
I don't know if it's any better, but there is https://www.mathworks.com/help/matlab/ref/sheetnames.html
Otherwise, try/catch might work.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Data Import from MATLAB 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!