Previous section-----Next section

Code Box Deployment

To create a stand-alone workbook interface, you can transfer the Mathematica macros you have developed in a notebook to code boxes in the Excel workbook. Once this is done you can create buttons for the macros.

To deploy Mathematica code as an Excel macro you will need to copy the the notebook cells that define the macro to a code box in an Excel workbook. Here are the notebook cells that contain the code you want to use as a macro.

Here is how to transfer the code to Excel.

1. Create a code box for the macro in Excel:

2. Copy the code from Mathematica:

3. Paste the Mathematica code into the Excel code box:

To create a button for the Mathematica macro:

For more information on using macros you create in Excel, see Working with Macros.

Notes
• When running macro code from inside Excel, it is not necessary to load the ExcelLink package. However, you can still include the line in your macro.
• Using the code box approach, you can create workbooks that have no dependencies on other files.