Skills

Matlab Use Spreadsheet Link

Exchange data between Excel and MATLAB using Spreadsheet Link VBA macros and worksheet...

Install

npx skills add matlab/matlab-agentic-toolkit --skill matlab-use-spreadsheet-link -g -a claude-code -y
Category
Documents
Updated
8d ago
License
See repository
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Exchange data between Excel and MATLAB using Spreadsheet Link VBA macros and worksheet functions. Use when writing Excel VBA macros that call MLPutMatrix, MLGetMatrix, MLPutVar, MLGetVar, MLPutRanges, MLEvalString, MLGetFigure, or MatlabRequest.

Spreadsheet Link

Spreadsheet Link connects Excel to MATLAB, enabling users to exchange data between Excel and MATLAB, run MATLAB commands, using MATLAB as the compute engine from Excel.

When to Use

  • User wants to export Excel data into MATLAB workspace variables
  • User wants to import MATLAB variables back into Excel cells or VBA variables
  • User wants to execute MATLAB commands from an Excel VBA macro or worksheet cell
  • User wants to import MATLAB figures into Excel as images
  • User is building a workflow that uses Excel as the data interface and MATLAB as the compute engine

When NOT to Use

  • MATLAB-only workflows with no Excel involvement
  • Python or .NET integration with MATLAB (use MATLAB Engine API instead)
  • Deploying MATLAB as a web service (use MATLAB Production Server instead)

Architecture

Spreadsheet Link uses VBA macros or worksheet functions in Excel to communicate with a locally running MATLAB instance via COM.

┌─────────────────────┐         VBA / COM          ┌─────────────────────┐
│   Excel             │  ◄─────────────────────►   │  MATLAB             │
│   (VBA or cells)    │                            │  (workspace)        │
└─────────────────────┘                            └─────────────────────┘
  • Windows only (requires MATLAB COM Server)
  • MATLAB must be running locally
  • Two usage modes: VBA macros or worksheet functions (cell formulas)
  • Two data exchange styles: range-based (MLPutMatrix/MLGetMatrix) or VBA-variable-based (MLPutVar/MLGetVar)

Key Functions

Read the whole SKILL.md on GitHub

More in Documents