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

1 visualizzazione (ultimi 30 giorni)
[status,msg] = xlswrite('filename',RESULT);

Risposta accettata

Iain
Iain il 28 Ago 2013
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 Commenti
vaishali
vaishali il 28 Ago 2013
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 il 28 Ago 2013
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.

Accedi per commentare.

Più risposte (0)

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by