MATLAB: How to export a MATLAB matrix ‘A’ as a table in Microsoft Word

MATLABMATLAB Report Generatormspublishtableword

I have a matrix A in MATLAB that I would like to export to Microsoft Word as a table.

Best Answer

This functionality is currently not possible with the MATLAB publishing tools.
There are however, several user-submitted functions that can help you achieve this. These are available at the MATLAB Central File Exchange. One, called TABLE2WORD, uses ActiveX controls to take data from a MATLAB variable and put it in a table in a Word document. Another option is a function called WriteToWordFromMatlab. This contains a sample script demonstrating how you can use ActiveX controls to create a report with figures, tables, headers, and text. The files can be found at the following locations:
Note that MathWorks does not guarantee or warrant the use or content of these submissions. Any questions, issues, or complaints should be directed to the contributing authors.