It worked. Thansk! Gabi.
But I still need to seek a convenient way to do this job.
Are there other ways to save the result table in spreadsheet format
immediately after "tabstat command"?
I have another question on "tabstat" command.
I put the option command "save" at the end of "tabstat" command.
.tabstat pop7 pop8 pop9 pop0, by(city) stats(sum) save
I believe that the option "save" will save the result of tabstat somewhere.
I don't know where STATA saved the result. And I don't know how I can pull
out the result either?
Do I misunderstand the function of the option "save"?
Any comments would be helpful.
Thanks.
sugie
-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Huiber Gabi
(nat1gxh)
Sent: Tuesday, February 17, 2004 12:51 PM
To: [email protected]
Subject: st: RE: Question: Saving table result
Why don't you just
preserve
collapse (sum) pop7 pop8 pop9 pop0, by(city)
save myfile, replace
outsheet using myfile.txt
restore
The open the tab-delimited myfile.txt with Excel?
Gabi
-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Tuesday, February 17, 2004 12:27 PM
To: [email protected]
Subject: st: Question: Saving table result
Dear Statalist,
I have a simple question.
I conducted "tabstat"(see below)command for my data.
How can I save the result table as a data file?
I have to import the result table into EXCEL.
Please help me out.
Thanks.
sugie
-----------------------------------------------------
.tabstat pop7 pop8 pop9 pop0, by(city) stats(sum) save
Summary statistics: sum
by categories of: city
city | pop7 pop8 pop9 pop0
------+----------------------------------------
city_A| 8695 8739 7132 9488
city_B| 956612 760833 683461 642044
city_C| 751015 695510 655468 644137
city_D| 346775 433034 484904 567810
------+----------------------------------------
Total | 2063097 1898116 1830965 1863479
-----------------------------------------------
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/