Previous section-----Next section

Fixing Problematic Data

If you run into problems pasting data into Excel, it is likely the copied data is not in the proper form. The Paste command requires data to be in Mathematica InputForm. Depending on how you copied the data and from what kind of notebook cell you copied it, you may end up with data in a format other than InputForm.

The Paste command can fix certain common problems with the data automatically, however in some cases you may still need to convert to InputForm on your own.

You can do this two ways:

If you do not want to modify your source notebook, the second approach is the most convenient.

Here is an example of some data to paste.

To view this data in the Mathematica Clipboard window, copy the output then, in Excel, open the Mathematica Clipboard window and click Get.

The Mathematica Clipboard window before clicking Evaluate.

You can see additional formatting characters are present in the data. In this case, the fixes are minor, so pasting directly into Excel does, in fact, still work. However, you can also convert the contents of the Clipboard to InputForm by clicking Evaluate.

The Mathematica Clipboard window after clicking Evaluate.

Once the data has been standardized to InputForm, you can continue to paste it into Excel using the standard Paste command or the Paste button on the Clipboard window.

Notes
• An alternative to copying and pasting is to assign and retrieve Excel data programmatically from Mathematica. This can be significantly faster if you are dealing with large data sets. For more information, see Getting Started.