I am trying to sort the output data, I need a help to write data into excel file using for loop.
Show older comments
I am trying this, but the excel file is getting rewritten for every iteration and values in the cell are getting replaced. I don't know how to replace the "A2" and "B2" with 'AN' and 'BN' so that for the first iteration the values are written into file's A1, B1 cells respectively... "
u_real = real(u);
v_real = real(v);
for n = 1:100000
if and(u_real>0, v_real>0)
xlswrite('new.xlsx',u_real(n),'sheet1','A2');
xlswrite('new.xlsx',v_real(n),'sheet1','B2');
end
Accepted Answer
More Answers (0)
Categories
Find more on Spreadsheets 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!