# Transform a table in Mathematica into one in MS Word

How does one transform a table in Mathematica into one in MS Word?

• mathematica.stackexchange.com/questions/22055/… – Alan Jun 9 '17 at 23:16
• Hello, thank you it is better indeed. By copying as mathml, i can obtain a mathtype object in MS word and can modify the text. However, it is no longer a table in MS Word. I would have liked to obtain a MS Word table – Bendesarts Jun 10 '17 at 17:21
• Perhaps export to an Excel file (Export["table.xls", data]), open that file in Excel, and copy-paste the table into Word? – jjc385 Jun 10 '17 at 20:00

The simplest way to copy the gridboxed table into the Word is right-click on it and choose a menu item "Copy as" -> "MathML". And paste it into the Word.

It will be inserted as table object:

• Hello, thank you it is better indeed. By copying as mathml, i can obtain a mathtype object in MS word and can modify the text. However, it is no longer a table in MS Word. I would have liked to obtain a MS Word table – Bendesarts Jun 10 '17 at 17:22
• @Bendesarts, I know one more way but it is a bit more complicated. You can export the table from Mathematica to an Excel file and use it further in MS Office documents.. – Rom38 Jun 11 '17 at 9:56
• ok and how do you do the exportation for Mathematica to an Excel file ? by copy the MAthematica table as plain text ? – Bendesarts Jun 11 '17 at 9:58
• @Bendesarts, no, as usual: Export["file.xlsx",table], where the table is a variable name containing your table. It can be even not gridboxed.. You can lear more in help about export to xlsx format – Rom38 Jun 11 '17 at 15:03

The word "Table" may appear in Mma in different contexts.

If you are speaking about a table that can be obtained with, say, Grid, you may wrap it by Rasterize and then copy-paste it in Word.

This is an example of a table created in Mma:

lst2 = Table[i*j, {i, 1, 4}, {j, 1, 8}];
gr=Grid[lst2, ItemStyle -> {FontColor -> Red, FontSize -> 20},
Dividers -> {{Directive[Green, Thickness[8]],
Directive[Green, Thickness[8]], None, None, None, None, None,
None, Directive[Green, Thickness[8]]},
Directive[Blue, Thickness[5]]} , ItemSize -> {2, 3}];


and now the rasterized copy:

Rasterize[gr]


that can be copy-pasted into Word

Have fun!

• thank you for you help. But, it doesn't help me. In fact, i look for a way such as i can copy/ paste the table into word but after i would like to have the possibility to modify the table in MS word. With this way, i copy into word a picture. But, i would like to copy a table where the values could be changed. – Bendesarts Jun 10 '17 at 13:22

Try this: In MMA, create a grid and display it using TraditionalForm. For instance,

Grid[ { { "a", "b", "c" }, { 1, 2, 3 },
{ x, y, z }  }  ] // TraditionalForm


Now highlight the displayed grid and use Ctl-C to copy the text to the clipboard.

In MS Word, click an empty part of the document where the table will be. Paste the clipboard into the document with the "Keep text only" option. This option will paste the text into the document with tab characters separating the columns. Finally, highlight the text and click on the Insert ► Table menu option. That will turn the tab-delimited text into a Word table.

This was tested with Mathematica 10.1, MS Word 2010 and Windows 7.

As noted by Alexey Popkov, this also works with Mathematica 8.0.4 and MS Word 2003 on Windows 7, but in Word 2003 one should choose the Table ► Insert ► Table menu item.

• This also works with Mathematica 8.0.4 and MS Word 2003 on Windows 7 (but in MS Word 2003 one should choose the Table ► Insert ► Table menu item). – Alexey Popkov Jun 10 '17 at 23:57
• @AlexeyPopkov Thanks for the comment. I added it to my answer. – LouisB Jun 11 '17 at 3:59