Info

此问题已关闭。 请重新打开它进行编辑或回答。

i want to store 3 attributes in 3 columns of excel sheet and 10 times

1 次查看(过去 30 天)
code is>>>> f1='13_1_1'; f2='13_1_2'; a=0;
i want to create excel sheet named sheet1 having 3 columns where in firts attribute value of f1, second attribute value of f2 and in 3rd attribute value of a should get stored and i want to repeat the writing process.

回答(1 个)

ANKUR KUMAR
ANKUR KUMAR 2018-9-28
f1='13_1_1';
f2='13_1_2';
a=0;
A={f1,f2,a}
xlswrite('sample.xlsx',A,'sheet1 ','A1')
You can easily put this in a loop. If not, let us know.
  5 个评论
ANKUR KUMAR
ANKUR KUMAR 2018-9-29
It will overwrite the data if you re-execute the program with different values, because writing process in excel always starts with cell A1. You have to give cell number as input, then pass the cell number argument at the time of writing in excel.
TIP: Don't write multiple times in excel, as it complicated because everytime you have to provide cell number. Make a cell matrix,completely, in matlab in the manner you wish to write in excel and then use xlswrite command.

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by