WOLFRAM

Products
  • Wolfram|One
  • Mathematica
  • Wolfram Notebook Assistant + LLM Kit
  • Wolfram|Alpha Notebook Edition
  • System Modeler
  • All Products
Consulting & Solutions
  • Wolfram Consulting
  • Industry Solutions
  • Solutions for Education
Learning & Support
  • Wolfram U Courses
  • Wolfram Language Resources
  • Wolfram Community
  • Support FAQs
  • Contact Support
Company
  • About Wolfram
  • Careers
  • Events
  • Educational Programs
  • All Sites and Resources
Wolfram|Alpha
Wolfram Cloud
Your Account
  • Your Account
  • User Portal
Search

Working in Mathematica  / Creating Excel Functions  /
Previous section-----Next section

Code Box Deployment

Once you have developed a set of Mathematica functions you would like to use in Excel, you can collect cells that define the functions in one place to make it easier to transfer the code to Excel.

To deploy this code as an Excel function, you will need to copy the contents of the notebook cells that define the function to an initialization code box in an Excel workbook.

Here is how to do this.

1. Create an initialization code box in Excel:

• Click Macros on the Mathematica Toolbar.
• Click New... and name the macro Initialization. This is the default if no other macros exist in your workbook.
• Select a location for the code box and click OK.

2. Copy the code from Mathematica:

• Use Kernel Show In/Out Names to temporarily hide input labels.
• Select the Input cells to copy. To select noncontiguous cells, hold down the Control key.
• Press Crtl-C or choose Edit Copy.

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

• Click inside the code box.
• Click and drag to select all existing contents of the code box.
• Press Delete to delete the previous contents.
• Press Ctrl-V or choose {Edit , XMLElement[img, {src -> /chars/RightTriangle.gif, width -> 8, height -> 19, align -> absmiddle}, {}], Paste.}

You can now use the Mathematica function you created inside Excel.

Notes
• Using the code box approach, you can create workbooks that have no dependencies on other files.


  • Products
  • Wolfram|One
  • Mathematica
  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps
  • Finance Platform
  • System Modeler
  • Wolfram Player
  • Wolfram Engine
  • WolframScript
  • Wolfram Workbench
  • Volume & Site Licensing
  • Enterprise Private Cloud
  • Application Server
  • View all...
  • Services
  • Technical Consulting
  • Corporate Consulting
  • For Customers
  • Online Store
  • Product Registration
  • Product Downloads
  • Service Plans Benefits
  • User Portal
  • Your Account
  • Support
  • Support FAQ
  • Customer Service
  • Contact Support
  • Learning
  • Wolfram Language Documentation
  • Wolfram Language Introductory Book
  • Get Started with Wolfram
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Webinars & Training
  • Wolfram U
  • Summer Programs
  • Videos
  • Books
  • Public Resources
  • Wolfram|Alpha
  • Demonstrations Project
  • Resource System
  • Connected Devices Project
  • Wolfram Data Drop
  • Wolfram + Raspberry Pi
  • Wolfram Science
  • Computer-Based Math
  • MathWorld
  • Hackathons
  • Computational Thinking
  • View all...
  • Company
  • Events
  • About Wolfram
  • Careers
  • Contact
  • Connect
  • Wolfram Community
  • Wolfram Blog
  • Newsletter
© 2025 Wolfram
  • Legal & Privacy Policy
  • Site Map
  • WolframAlpha.com
  • WolframCloud.com