Home  /  Products  /  Stata 13  /  Create Word and Excel files

The ability to create Word and Excel files was introduced in Stata 13.

See the latest version of create word and excel files. See the new features in Stata 18.

Create Word® and Excel® files

ORDER STATA

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 18 to learn about what was added in Stata 18.