How to import XLS files with multiple sheets using the Dataset Array function?
18 次查看(过去 30 天)
显示 更早的评论
LS,
I would like to import a XLS file which has multiple worksheets in it using the dataset array function. Is this possible? When I use the standard code below it just imports the first worksheet.
A = dataset('XLSFile',filename,'ParamName',Value)
Your help is much appreciated.
Best regards,
Frits Hermans
0 个评论
回答(1 个)
Oleg Komarov
2011-5-3
example (same type dataset on 2 excel sheets):
A = cell(2,1);
for ii = 1:2 % number of sheets
A{ii} = dataset('XLSFile','test.xlsx','sheet',ii);
end
cat(1,A{:})
2 个评论
Oleg Komarov
2011-5-5
Edit your original post adding the FORMATTED code you're using. In addition post the first three lines of the exceel sheet.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!