How to read Excel file with changing the range automatically

1 次查看(过去 30 天)
HI All,
I am having problem to change the excel range automatically, and need to do it manually everytime
example
columnD = xlsread(filename,'D1:D1000');
The D1:D1000, I need to change it manually. Is there a way to change it automatically. Well I have tried few things below, but does not work
D(x):D(y) - does not work
D%d:D%d - does not work
D{x}:D{y} - does not work
Please help to show me how to control this.
Thank you Manimara

回答(1 个)

Yao Li
Yao Li 2013-5-14
i=1;
j=1000;
range_array=strcat('D',num2str(i),':D',num2str(j));

Community Treasure Hunt

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

Start Hunting!

Translated by