How can I read in rows from an Excel spreadsheet using iteration?
4 views (last 30 days)
Show older comments
jojofernandis
on 16 Apr 2014
Commented: jojofernandis
on 16 Apr 2014
I am working with a spreadsheet Is there a way I can read in one row at a time in a for loop? this is the code which i have filename='ht2.xls'; xlRange = 'A(i):H(i)'; mat=xlsread(filename,xlRange);
ie i want to input data from i'th row column A to H
2 Comments
Accepted Answer
Azzi Abdelmalek
on 16 Apr 2014
filename='ht2.xls';
mat=xlsread(filename);
Then use the row you want mat(k,:)
3 Comments
Azzi Abdelmalek
on 16 Apr 2014
Edited: Azzi Abdelmalek
on 16 Apr 2014
Use
ii1=1;
ii2=10;
xlRange = sprintf('A%d:H%d',ii1,ii2)
More Answers (0)
See Also
Categories
Find more on Data Import from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!