Can Excel Add-in created by Matlab compiler return multiple outputs?
2 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
Ran Chen
2018-9-20
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
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!