필터 지우기
필터 지우기

how to write xls file

조회 수: 2 (최근 30일)
rafi abdul
rafi abdul 2013년 3월 4일
Hi i want to write xls file using the below code i am able to write numeric data.i want to write header also.please guide how to proceed
data=get(handles.uitable1,'data');
checkbox1State = get(handles.af1, 'Value');
checkbox2State = get(handles.af2, 'Value');
checkbox3State = get(handles.af3, 'Value');
if checkbox1State
header={'first'}
p=data(start_pt:end_pt,1);
xlswrite('af1.xls',p,1,'A2');
end
if checkbox2State
header={'second'}
p=data(start_pt:end_pt,2);
xlswrite('af1.xls',p,1,'B2')
end
if checkbox3State
header={'third'}
p=data(start_pt:end_pt,3);
xlswrite('af1.xls',p,1,'C2')
end

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 3월 4일
편집: Azzi Abdelmalek 2013년 3월 4일
x=[1;2;3]; % first column
y=[10;20;30] ;% second column
header={'x','y'}
M=[header ; num2cell([x y])]
xlswrite('filname.xls',M)
  댓글 수: 5
rafi abdul
rafi abdul 2013년 3월 6일
thanks it is working
rafi abdul
rafi abdul 2013년 3월 8일
hi aziz i am trying to write xls file using above code but am able to write upto 50000 rows only.i have 130000 rows how to proceed.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by