How can I read in rows from an Excel spreadsheet using iteration?

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 comentarios

Why read one row each iteration?
because i need data specifically of that row for my program

Iniciar sesión para comentar.

 Respuesta aceptada

filename='ht2.xls';
mat=xlsread(filename);
Then use the row you want mat(k,:)

3 comentarios

The file is too big for that, it would take ages to read
Use
ii1=1;
ii2=10;
xlRange = sprintf('A%d:H%d',ii1,ii2)
Yes it worked Thank you :)

Iniciar sesión para comentar.

Más respuestas (0)

Preguntada:

el 16 de Abr. de 2014

Comentada:

el 16 de Abr. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by