Stata 17 and custom tables with ‘collect’

Stata 17 added a ‘Customizable tables’ feature which uses a collect command to build up custom formatting for the table. Stata will allow you to export the custom table in multiple formats, including Microsoft Word, HTML, and LaTeX. You can also use putdocx, putexcel, and putpdf.

Within StatTag, you are able to tag and import a table from one of these custom tables, but it is limited to only Excel output. This means that after you create your table, you can export it and StatTag will read it in using a command like:

**>>>ST:Table(Label="collect table test", Frequency="On Demand", Type="Default")
collect export "C:\Test\table.xlsx", replace
**<<<