Download Mathematica Link for Excel
Transcript
28
Working in Excel
The Excel Add-Ins manager.
@ To access the add-ins manager in Excel 2007 or later, click the Office button / File menu to the upper-left, click Excel
Options, then under Add-Ins, next to the Manage: Excel Add-ins drop down box, click Go....
Entering a Function
Once the MathematicaLink addin is loaded, you are ready to perform Mathematica calculations inside Excel. One way of
doing this is using the EVAL worksheet function. This worksheet function allows you to call any Mathematica function from
within an Excel formula.
Try entering the simple Mathematica function, Prime, in an empty worksheet cell. This is done as shown.
Formula
Result
=EVAL("Prime",100)
541
The value returned is the hundredth prime number.
@ Intermational verisons of Excel may require semi-colon separated formulas such as =EVAL("Prime"; 100)
@ During your first calculation, a Mathematica kernel will be launched as a computation server for Excel. This new process
may appear in your Windows task bar.
Now, try creating an interactive prime number calculator by specifying a cell reference as an argument.
Formula
Result
=EVAL("Prime",A1)
#N/A
Unless you have already entered a value in cell A1, the function returns unevaluated and displays an error code. The #N/A
error code indicates that one or more inputs to the formula are not available.
Type any integer you choose in cell A1, and a prime number will be calculated for you.
Here are some other examples.