There are three types of Mathematica macros that you can create. Macro Type | Description | Workbook Definitions | defines Mathematica functions used in a workbook | Workbook Processing | processes a workbook when the Evaluate button is clicked | Task | performs a task when an associated button on the spreadsheet is clicked |
Types of Mathematica macros. The difference between the first two is that a workbook definitions macro does not perform actions on a workbook, a workbook processing macro does.
All Mathematica macros can be deployed by creating a code box to store the Mathematica code inside a workbook. For workbook-level macros, however, you can also store the Mathematica code in a package file. Macro Type | Deployment | Workbook Definitions | initialization code box or workbook package file | Workbook Processing | initialization code box or workbook package file | Task | code box only |
Deploying Mathematica macros. A workbook package file should be in the same directory and have the same name as a workbook with the .m extension replacing .xls. |