Appdesigner: Writing Data To Excel

16 visualizaciones (últimos 30 días)
I
I el 28 de Mzo. de 2021
Comentada: I el 1 de Abr. de 2021
% 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?

Respuesta aceptada

dpb
dpb el 28 de Mzo. de 2021
Editada: dpb el 28 de Mzo. de 2021
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 comentarios
dpb
dpb el 29 de Mzo. de 2021
What's wrong with writetable using proper syntax as shown?
I
I el 1 de Abr. de 2021
Nothing at all. It worked perfectly.

Iniciar sesión para comentar.

Más respuestas (0)

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by