Nico
Nico

Reputation: 83

Options to compile a Matlab application with Excel GUI

I am developing a Matlab application for myself and for others using a GUI on Excel (for ease of use but also because some data processing need to be done in Excel).

To simplify, here are all the parts making up my application:

Currently, when others need to use it, they give me the run settings (Part 1), I run the Matlab program for them (Part 2) and give them the data, images and my last Excel GUI (Part3).


I am trying to improve the situation by combining the parts above. I see 2 options:


Now my questions:

  1. Can I (Should I? Should I not?) do both options? or am I over complicating everything? and should not use Excel Link toolbox at all?
  2. Do I need Matlab Builder EX to achieve Option 2? (therefore creating an Add-in) or could I also achieve this with the toolboxes: Excel Link + Compiler? (No Add-in, but VBA code?)

Cheers!

Upvotes: 2

Views: 2529

Answers (2)

Nico
Nico

Reputation: 83

There is a great answer which kind of answer my question. MATLAB Compiler vs MATLAB Coder

Basically:

  • For R2014b and ealier version: It is possible to produce Excel add-ins with the "MATLAB Builder EX for Excel" toolbox

  • From R2015a (recent release): The toolbox "MATLAB Compiler" can now produce Excel add-ins

This simplify things a lot!

Nico (answering his own question :-) )

Upvotes: 0

Amro
Amro

Reputation: 124563

If you choose to use the MATLAB Compiler, the following is what I imagine the steps would be

  • create a GUI in MATLAB. It will present an interface that allows the user to input some settings. It also has a "RUN" button that will run your MATLAB program with those parameters.

  • at the end of your alorithm, use COM automation to open Excel and programmatically fill tables with the results of the previous step. You could add snapshots of any generated MATLAB figures and plots to the excel file (see here for an example) or simply save as separate image files. You could even add VBA macros to the sheet.

  • Deploy the above as a standalone application. It will not depend on MATLAB (only the freely available MCR runtime has to be installed by the user).

  • The user runs your application, and use it to generate the Excel file. Now the user can optionally open this file, and manually perform any final data manipulation.

If you want additional integration, you could use the "Spreadsheet Link EX" toolbox.

HTH

Upvotes: 2

Related Questions