Creating a Cell Array from multiple excel sheets

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

답변 (2개)

KSSV
KSSV 2016년 9월 19일

0 개 추천

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.
Andrei Bobrov
Andrei Bobrov 2016년 9월 19일

0 개 추천

out = cell(100,1);
for jj = 1:100
out{jj} = xlsread('path_to_your_xls_file.xlsx',jj);
end

카테고리

도움말 센터File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

질문:

Jim
2016년 9월 19일

답변:

2016년 9월 19일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by