Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: outsheeting tempvar names


From   Joe Canner <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: outsheeting tempvar names
Date   Wed, 18 Sep 2013 15:07:07 +0000

Adrian,

A couple of possibilities, one of which may be more helpful than the other, depending on the context:

1) Rename the temporary variables first:
. rename `var1' var1
. outsheet var1 using "path"

2) Add a label to the temporary variables and use -export excel-, which allows you to use the variable label as the column header:
. label var `var1' "var1"
. export excel `var1' using "path", first(varl)

Regards,
Joe Canner
Johns Hopkins University School of Medicine

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of adrien bouguen
Sent: Wednesday, September 18, 2013 10:52 AM
To: [email protected]
Subject: st: outsheeting tempvar names

Dear statalisters,

I would like to extract in a excel sheet few temporary variables using outsheet. My problem is when I do for instance:

outsheet `var1' using "path"

the variable name in the excel sheet is not var1 but something like __00000. It is annoying because I'd like to use this as a regression table with var1 as column name.

Any idea how to solve this?

Thank you so much for your replies

Best


--
Adrien Bouguen
Ecole d'économie de Paris - J-PAL
66 bis avenue Jean Moulin
75014 Paris
tel: +33 (0)1 71 19 40 83
port: +33 (0)6 69 34 12 02

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index