How to avoid overwriting in EXcel worksheet when program run next time?

1 次查看(过去 30 天)
[status,msg] = xlswrite('filename',RESULT);

采纳的回答

Iain
Iain 2013-8-28
Step 1:
Check to see what has been written to the worksheet:
[n t r] = xlsread(filename,sheetno);
Step 2:
Figure out where to write your new data.
code
Step 3:
Write the new data to that location:
xlswrite(filename,result,sheetno,topleftcorner)
  2 个评论
vaishali
vaishali 2013-8-28
I have to write result after the filled location.say data already exists in first & second row and first to four column in file,now in next program run result should store in third row and first to four column.
vaishali
vaishali 2013-8-28
I tried hard but getting error.
% [status,msg] = xlswrite('reslt',RESULT);
% firstrow = xlsread('reslt', 1, 'A1:D1')
[n1 t1 r1] = xlsread('reslt',1)
[a b]=size(r1); a=a+1; range='A{a,:}:D{:,:}'; % % topleftcorner=A2:D2; % [status,sheets,format] = xlsfinfo('reslt'); % topleftcorner=[]; % topleftcorner=topleftcorner+1 xlswrite('reslt',RESULT,1,range); ERROR message:r1 =
[15.9544] [0] [3.5564] [5.0707]
[ 8.1545] [0] [1.8228] [2.2196]
Error using xlswrite (line 220) Excel returned: Error: Object returned error code: 0x800A03EC.

请先登录,再进行评论。

更多回答(0 个)

产品

Community Treasure Hunt

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

Start Hunting!

Translated by