Can readtable read variable opt in a loop?
2 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
Walter Roberson
2020-3-31
Yes.
'sheet' and 'range' are both valid for "spreadsheet" (.xls, .xlsx) files
3 个评论
Walter Roberson
2020-3-31
Yes xlsm too.
Sheetname="1"; Col="BH" ;
readtable('YourFile.xlsm','sheet',Sheetname,'range',Col)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!