Read 'next sheet' in excel file
조회 수: 1 (최근 30일)
이전 댓글 표시
I have multiple excel files with many sheets of different name. (5 excel files, each has >20 worksheets)
my objective is to read cell B2 from every sheet and store them in a big matrix
its really really time consuming to write something like this f=xlsread(InputFileName1,sheet1,'B2'); f=xlsread(InputFileName1,sheet2,'B2'); f=xlsread(InputFileName1,sheet3,'B2'); f=xlsread(InputFileName1,sheet4,'B2'); etc...
every sheet is nammed differently, so in the above example, i have to rename every single sheet (again time consuming)
xlsread is a very slow command, is there a more efficient way to read all one shot? or any command to "read next sheet", so i dont have to rename the sheet name one by one in my m file?
please help, thanks:-)
댓글 수: 0
답변 (1개)
Image Analyst
2012년 7월 19일
You need to use ActiveX. Search the Answers forum for examples, or use Brett's code: http://www.mathworks.com/matlabcentral/fileexchange/4415-readfromexcel
댓글 수: 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!