New program -tw3xls- available on SSC
Dear Stata users,
I am thrilled to present my first publicly available Stata program -tw3xls-.
It can be installed from SSC via
The program allows to nicely export three-way and four-way tables into xls or xlsx.
For now, it works only with frequency tables. The number of variables in the varlist is limited to three, one more can be added using the by(varname) option.
The general syntax is as follows:
Command options are described in the help file.
Required minimum version: Stata 14.1 (due to some -putexcel- commands used in the ado file).
The program itself was inspired by -tab2xl- and -tab2xl2- .
Several words of notice:
1) -tw3xls- works with both numeric and string values;
2) When you use encoded variables, the output will contain numeric codes. If you want to see the labels in the output, make sure an encoded variable is decoded and contains string values;
3) A three-way table consists of the following parts: rows, columns and supercolumns;
4) A four-way table is defined as a set of three-way tables. For example. if there are four unique values in the by-variable, you will get four similar three-way tables in Excel, each one representing its own group;
5) Performance degrades significantly when there is a large number of groups in the by-variable.
I really hope you will enjoy the -tw3xls- program!
If you have found any bugs/issues/problems or have wishes or even wish to say 'thank you' you are welcome
A little more additional information (partly repeats the help file) with performance investigation is in the attached pdf file.
Output examples with different types of formatting (for the sake of performance) are in the attachment.
Kind regards,
Andrey Ampilogov
Dear Stata users,
I am thrilled to present my first publicly available Stata program -tw3xls-.
It can be installed from SSC via
Code:
ssc install tw3xls
For now, it works only with frequency tables. The number of variables in the varlist is limited to three, one more can be added using the by(varname) option.
The general syntax is as follows:
Code:
tw3xls rowvar supercolumnvar columnvar using example1, (options)
Required minimum version: Stata 14.1 (due to some -putexcel- commands used in the ado file).
The program itself was inspired by -tab2xl- and -tab2xl2- .
Several words of notice:
1) -tw3xls- works with both numeric and string values;
2) When you use encoded variables, the output will contain numeric codes. If you want to see the labels in the output, make sure an encoded variable is decoded and contains string values;
3) A three-way table consists of the following parts: rows, columns and supercolumns;
4) A four-way table is defined as a set of three-way tables. For example. if there are four unique values in the by-variable, you will get four similar three-way tables in Excel, each one representing its own group;
5) Performance degrades significantly when there is a large number of groups in the by-variable.
I really hope you will enjoy the -tw3xls- program!
If you have found any bugs/issues/problems or have wishes or even wish to say 'thank you' you are welcome

A little more additional information (partly repeats the help file) with performance investigation is in the attached pdf file.
Output examples with different types of formatting (for the sake of performance) are in the attachment.
Kind regards,
Andrey Ampilogov
Comment