필터 지우기
필터 지우기

append data in excel sheet

조회 수: 24 (최근 30일)
Mahmoud Hassan
Mahmoud Hassan 2018년 9월 28일
댓글: ANKUR KUMAR 2020년 5월 19일
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

답변 (1개)

ANKUR KUMAR
ANKUR KUMAR 2018년 9월 28일
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
AJEET KUMAR
AJEET KUMAR 2020년 5월 19일
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 2020년 5월 19일
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?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by