What problem does it solve?
Writing Excel VBA macros that communicate with MATLAB requires knowing the exact Spreadsheet Link API semantics, such as which functions are queued versus immediate, and small mistakes like passing a Range object instead of a string cause silent failures. This Skill provides the correct function signatures, queuing rules, and code generation patterns for building Excel-to-MATLAB workflows.
Core Features & Use Cases
- Data Exchange Functions: Covers MLPutMatrix, MLGetMatrix, MLPutVar, MLGetVar, MLPutRanges, and MLAppendMatrix for moving data between Excel ranges, VBA variables, and the MATLAB workspace.
- Command Execution and Figures: Uses MLEvalString to run MATLAB code from Excel and MLGetFigure with MatlabRequest to import MATLAB plots as images into worksheets.
- Use Case: A financial analyst keeps portfolio prices in Excel and wants MATLAB to compute a total return index and chart. The Skill generates a VBA macro that exports the ranges, runs the MATLAB computation, writes results back to cells, and embeds the figure.
Quick Start
Write an Excel VBA macro that sends the range A1:B100 to MATLAB, computes the column means, and writes the result back to cell E1.