What Takes to Wrap MATLAB function to Use From Excel?
Show older comments
I've got a MATLAB function that pulls data from an Excel spreadsheet (actually two separate ones) and then writes after processing into a third.
It does not return any values to the spreadsheets containing the data it uses and writes it in a "veritable plethora" of places scattered all around in the target.
What I'd like is for the person who is working in the one spreadsheet containing the source of most of the data to be able to call the MATLAB function to update the other without needing to run MATLAB itself--they don't have the skillset nor the license so I need to be able to wrap the needed runtime.
7 Comments
Mario Malic
on 19 Mar 2021
Hey, you can just create an app in App Designer, containing one button. Define a callback for the button in which your function is called. One issue might be the path to Excel files, you can use uigetdir with TextEdit component. If you don't want to bother with that I can make an app for you. Does your function have input arguments?
dpb
on 19 Mar 2021
Mario Malic
on 19 Mar 2021
Edited: Mario Malic
on 19 Mar 2021
True, MATLAB compiler is required.
The MATLAB Runtime is a standalone set of shared libraries that enables the execution of compiled MATLAB applications or components. I guess you need a compiler for Runtime to be utilized.
Edit: I do remember this question, and I think I suggested Octave because of the license issues, but I do not remember why not?
dpb
on 20 Mar 2021
Mario Malic
on 20 Mar 2021
When you want to buy the Compiler, there's not really the price (in one of other questions 10 years ago, Walter Robertson mentioned that it was ~$4800), maybe TMW will be generous, at the end of the day, it's a pro bono thing. Maybe customer support would be a better place to discuss your case.
The question about Octave from previous comment still stands.
Mario Malic
on 20 Mar 2021
Walter Roberson
on 20 Mar 2021
MATLAB Compiler SDK is the appropriate toolbox for building something that can be called from Excel. Requires MATLAB Compiler license as well. I have never tried it (I do not have a Windows license for Excel)
Accepted Answer
More Answers (1)
dpb
on 20 Mar 2021
0 votes
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!