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

Re: Export tables to Excel

$
0
0

You can use putexcel in your loop, but you will probably want to use the advanced syntax. Your do-file would look something like

putexcel set myfile.xlsx, modify sheet("mysheet")
local row = 1
foreach x of varlist edad1-edad11{
svy, sub(`x') ...
putexcel A`row' ...
local row = `row' + 1
svy, sub(`x')...
putexcel A`row' ...
local row = `row' + 1
}


Viewing all articles
Browse latest Browse all 1126

Trending Articles