Search
   >> Home >> Products >> Stata 13 >> Create Word and Excel files

Create Word® and Excel® files


Stata 13 adds tools to put Stata results—estimation results, returned results, matrices, etc.—into Excel and Word documents.

Although these tools were intended for programmers, there is at least one trick that many Stata users will want to know.

First, fit any estimation model in Stata; for example,

. sysuse auto
. regress mpg price weight displacement trunk 1.foreign

Then type

. putexcel B3 = matrix(r(table)', names) using myresults.xls

Here is what is in myresults.xls:

If myresults.xls had previously existed, it would be modified. If not, it would have been created. You can put many results into the same Excel file.

Of course, these tools will do much more. Read all about them in the Stata manuals:

Export results to an Excel file
Generate Office Open XML (.docx) files

Stata has long been able to export data to Excel files.

Back to highlights

See New in Stata 13 for more about what was added in Stata 13.

The Stata Blog: Not Elsewhere Classified Find us on Facebook Follow us on Twitter LinkedIn Google+ Watch us on YouTube