Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
[status,msg] = xlswrite('filename',RESULT);

Respuesta aceptada

Iain
Iain el 28 de Ag. de 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 comentarios
vaishali
vaishali el 28 de Ag. de 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 el 28 de Ag. de 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.

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by