Appdesigner: Writing Data To Excel

조회 수: 17 (최근 30일)
I
I 2021년 3월 28일
댓글: I 2021년 4월 1일
% Button pushed function: WriteDataButton
function WriteDataButtonPushed(app, event)
w = writetable("Book1.xlsx","Sheet",1);
app.UITable.Data = w;
end
I can open an excel sheet with opentable, so I just assumed that writetable would work in the oppose way. I was wrong.
I have the error:
Error using writetable
Too many output arguments.
Is there a way to get this to work?

채택된 답변

dpb
dpb 2021년 3월 28일
편집: dpb 2021년 3월 28일
writetable returns no arguments and needs the data to output as an argument -- read the doc first...
% Button pushed function: WriteDataButton
function WriteDataButtonPushed(app, event)
writetable(app.UITable.Data,"Book1.xlsx","Sheet",1);
end
  댓글 수: 3
dpb
dpb 2021년 3월 29일
What's wrong with writetable using proper syntax as shown?
I
I 2021년 4월 1일
Nothing at all. It worked perfectly.

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by