append data in excel sheet

13 visualizaciones (últimos 30 días)
Mahmoud Hassan
Mahmoud Hassan el 28 de Sept. de 2018
Comentada: ANKUR KUMAR el 19 de Mayo de 2020
I want to append date and i want all these date in the same row ... also i want to know how to append another data in the row next automatically each time ... pls help

Respuestas (1)

ANKUR KUMAR
ANKUR KUMAR el 28 de Sept. de 2018
Just write the cell name at the time of using xlswrite
A=rand(6,12)+10 %random data
xlswrite('sample.xlsx',A,'sheet name','A1')
% now you already have file names sample.xlsx in which data is spreaded
% upto A1 to L6. Now suppose you wish to append in first row after L column
xlswrite('sample.xlsx',[2,5,8,9,6,3,5],'sheet name','M1')
%first row of xlsx file have columns upto R and remaing have still up to M
%now, suppose you want to add down of the complete written data
xlswrite('sample.xlsx',magic(5),'sheet name','A8')
  2 comentarios
AJEET KUMAR
AJEET KUMAR el 19 de Mayo de 2020
Actually, we don't want to specify the cell number to put the data.
Can i do something, where the new data gets appended after the data which is available in the Excel data?
ANKUR KUMAR
ANKUR KUMAR el 19 de Mayo de 2020
Yes, you can do. It can be done easily by reading the number of rows in the above command, and then use that number to generate the cell number.
By default, MATLAB prints the matrix starting from cell numer 'A1'.
"... after the data which is available in the Excel data?" Is the already available data written from the other source (like downloaded from internet), or already available data has been written by you through MATLAB?

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by