How to read several times similarly from EXCEL?

1 回表示 (過去 30 日間)
Steven
Steven 2013 年 12 月 29 日
コメント済み: Steven 2013 年 12 月 29 日
How can we read data from Excel for similar sheet names and even file names, I mean in a loop?
for example, we want to read data from sheets A1,A2,...A100 from an Excel file.
Can we do it in a loop? I couldn't!
Things like this do not work:
for i =1:100
sheet= 'A(i)'
E1 = xlsread('filename', sheet,'range')
or
sheet= 'Ai'
sheet= 'A% i'
How can we do so?
Thanks
Steven

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 12 月 29 日
編集済み: Azzi Abdelmalek 2013 年 12 月 29 日
for k=1:100
sheet= sprintf('A%d',k)
E{k}= xlsread('filename', sheet)
end
  1 件のコメント
Steven
Steven 2013 年 12 月 29 日
Thanks!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by