Running Matlab script from Excel

10 visualizzazioni (ultimi 30 giorni)
Dhana Raj
Dhana Raj il 5 Lug 2011
I have a Matlab m-file that I would like to execute from Excel. How do I write the Excel VBA code to do so?
I have Spreadsheet Link EX installed and I am able to import and export values between Excel and Matlab, but I can't seem to find an easy way to run my custom m file.

Risposta accettata

Chirag Gupta
Chirag Gupta il 5 Lug 2011
With the spreadsheet Link EX installed, you should be call your custom MATLAB code using the Add-in.
Click on MATLAB Add-in -> Run custom code -> Enter your function name
For doing so in VBA, refer to
  1 Commento
Dhana Raj
Dhana Raj il 5 Lug 2011
Thanks. Tried this earlier, but it didn't seem to work. Works now after I fiddled around with the file paths where my script was located.

Accedi per commentare.

Più risposte (1)

Kaustubha Govind
Kaustubha Govind il 5 Lug 2011
  2 Commenti
Chirag Gupta
Chirag Gupta il 5 Lug 2011
This will not utilize the already running Spreadsheet link
Dhana Raj
Dhana Raj il 5 Lug 2011
Thanks for the suggestion.

Accedi per commentare.

Categorie

Scopri di più su Data Export to MATLAB in Help Center e File Exchange

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by