Creating a Cell Array from multiple excel sheets
21 次查看(过去 30 天)
显示 更早的评论
Hi, So I have a excel file with 100 sheets. Is that a way for me to combine all the A1 elements from each excel sheet into one matrix, all A2 elements from each excel sheet into one matrix etc. and then store all matrices into a cell array? Any help will be appreciated. Cheers Jim
0 个评论
回答(2 个)
KSSV
2016-9-19
You can read the data in a specific sheet of excel using:
[num,txt,raw] = xlsread(filename,sheet,xlRange)
num gives only numbers of the data, txt gives the test data, raw gives all the excel info in cell matrix. You can pick what ever column/ row you want from raw and merge.
0 个评论
Andrei Bobrov
2016-9-19
out = cell(100,1);
for jj = 1:100
out{jj} = xlsread('path_to_your_xls_file.xlsx',jj);
end
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!