Stata PutExcel

-putexcel- manipulates Excel spreadsheets.


Usage

putexcel set foo.xlsx

putexcel A1 = "foobar"
putexcel B1 = `total'
putexcel B2 = formula(EXCEL_EXPR)

Tables

To insert a table, first it must be stored in a matrix.

tab foo bar, matcell(foobar)

Then try:

putexcel D1 = matrix(foobar), rownames

Styles

putexcel A1:A5, merge hcenter border(bottom, thick)


External Content

Graphs can be inserted.

graph export foo.png
putexcel C1 = image(foo.png)


See also

Stata manual for -putexcel-


CategoryRicottone

Stata/PutExcel (last edited 2025-10-24 17:32:23 by DominicRicottone)