I have a lot of messy things in Mathematica in a form like this:

enter image description here

Mathematica perfectly solves all these symbolic equations. But I'm in trouble when using Excel link with Mathematica. I really need to use Mathematica-defined symbolic formulas in Excel, so how can I transform from symbolic language to code?

  • 1
    $\begingroup$ Talk is cheap. Ars longa, vita brevis. $\endgroup$ – Artes Mar 11 '16 at 19:08
  • 1
    $\begingroup$ There is no difference between what you call symbolic language" and what you call "code" in Mathematica, so it is not clear what you are asking for. Could you elaborate on what you mean by "code"? $\endgroup$ – m_goldberg Mar 11 '16 at 20:27

There are two methods. The first is to use the 'InputForm' function on any of your symbolic expressions.

You could also, in the long run, try to use the defined functions in Mathematica for the symbols to begin with. In my experience, this is a more robust method. For example, the formula you posted can be represented with the Sum function. Putting the symbols into Mathematica's Wolfram Documentation (available in the Help menu), will give you how Mathematica interprets these symbols. For example, searching the summation symbol yields the information at the following link: https://reference.wolfram.com/language/ref/character/Sum.html

| improve this answer | |
  • $\begingroup$ Thank you, InputForm makes big sense! $\endgroup$ – simusminus Mar 12 '16 at 18:06
  • $\begingroup$ However, I'm still experiencing problems trying to transform symbolic expression I've posted above. It goes to alpha[x_,y_,N_]:= Sum[Subscript[x, i] + Subscript[y, i], {i, 1, N}] and I'm using =EVAL("alpha",H3:H9,I3:I9,7) formula in excel.No good, formula is not recognised :( $\endgroup$ – simusminus Mar 12 '16 at 18:16
  • $\begingroup$ @simusminus: The syntax of Mathematica is different from Excel, and so you cannot just copy and paste. This will be a more manual process, as I do not know of any tools that do this explicitly (although they might exist without my knowledge). $\endgroup$ – mikeagibson Mar 20 '16 at 17:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.