How to Export tabulate Result to Excel Using tab2xl Command in Stata.

Many times you want to export the tabulation to Excel directly but you cannot because Stata (older versions) doesn't have build-in command to do something like this directly. So you need to install the tab2xl which written by the user.

We can find tab2xl by searching in Google and in the Stata command bar. Firstly we search in Google.

tab2xl in Stata

You can search in Google using this keyword: "tab2xl stata" and you find the first website is blog.stata.com, we follow this website and we will see the instruction to install this command.

tab2xl in stata

In Stata you can find the tab2xl as well by typing this command: help tab2xl.

tab2xl in stata

the you will see this window:

tab2xl in stata

Then just click on the link: tab2xl from http://www.stata.com/users/kcrow, then it bring you to the new window.

tab2xl in stata


Just click on the link: "(click here to install)" to install the command.

If you do not want to go through these steps, you can type the following commands in the command bar in Stata:

net describe tab2xl, from(http://www.stata.com/users/kcrow)

then:

net install tab2xl

Congratulation! now you can export your tabulate to excel.

You can learn how to use the tab2xl command by typing "help tab2xl" in the command bar to see the instruction in the help window.

Enjoy Stata.

 Reference: https://blog.stata.com/2018/06/07/export-tabulation-results-to-excel-update/




Comments