Quantcast
Channel: The Stata Blog - Latest Comments
Viewing all articles
Browse latest Browse all 1126

Re: Export tables to Excel

$
0
0

Hi Kevin,
Thank you very much for the nice explanation. I am trying out your command and it seems very helpful. Unfortunatelly I am still a Stata-beginner and have the following problem:
I'd like to loop over several variables to export the tab-results for these variables to an excel sheet. So far I did the following:

foreach v in hoh_years_edu dum_hoh_primaryeducation {
tab2xl `v' using "C:....xls", row(1) col(1) replace
}
Now the results for the last variable overwrite the results of the former ones. I couldn't succeed so far in putting them all in seperate sheets or putting the stata output below another.

Could you help me with this?
Thank you very much!

Lulu


Viewing all articles
Browse latest Browse all 1126

Trending Articles