MATLAB: Can readtable read variable opt in a loop

readtablexlsm

I have a lot of xlsm files to process.
Essentially I have a loop that searched for sheet name and column name that satisfies certain criteria and retrieve and store the sheet name and column, for example in a particular loop, perhaps,
SheetName = “1”; Col = “BH”;
Can I set these variable as options to readtable?

Best Answer

Yes.
'sheet' and 'range' are both valid for "spreadsheet" (.xls, .xlsx) files