Can Excel Add-in created by Matlab compiler return multiple outputs?

2 visualizaciones (últimos 30 días)
I have defined a Matlab function which returns several tables as outputs. The function works well in Matlab, if I compiled the code into Excel add-in, when I call the function in Excel, can I also get multiple tables? How do I define the cell range each table is placed? If I cannot get multiple outputs, how can I combine the tables into a single one while the tables are of different sizes and variable names?

Respuesta aceptada

Ran Chen
Ran Chen el 20 de Sept. de 2018
Hi,
You can use the Function Wizard to assist in returning function output to multiple cells, or ranges of cells, in a worksheet. You can define the cell range each table or matrix is placed on the 'Output' tag.
Key tasks in using the Function Wizard to achieve this goal are:
1) Install the Function Wizard.
2) Start the Function Wizard.
3) Select the option to incorporate your built COM component into Microsoft Excel.
4) Define the new MATLAB function you want to prototype by adding it to the Function Wizard and establishing input and output ranges.
5) Test your MATLAB function by executing it with the Function Wizard.
6) Create a macro.
7) Execute the macro you created using the Function Wizard.
8) Optionally inspect or modify the Microsoft® Visual Basic® code you generated with the COM component. Optionally, attach the macro you created to a GUI button.
Detailed instructions for each of these key tasks are available in the MATLAB Compiler documentation:
https://www.mathworks.com/help/compiler/excel/executing-functions-and-creating-macros-using-the-function-wizard.html

Más respuestas (0)

Categorías

Más información sobre Data Import from MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by