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]

Re: st: outsheeting tempvar names


From   daniel klein <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: outsheeting tempvar names
Date   Wed, 18 Sep 2013 17:14:34 +0200

Adrien,

if you are using Stata 13, which is what we assume per FAQ
(http://www.stata.com/support/faqs/resources/statalist-faq/#stata) ,
use -export excel- instead of -outsheet-. The former allows variable
labels to be written to the excel file via the -firstrow()- option.
The idea here is to add variable labels to temporary variables. You
could go

tempvar foo
<create `foo'>
la var `foo' foo

then

export excel `foo' using "path" ,first(varl)

This is also possible with Stata 12. If you are runnign Stata 11 or
lower and/or -outsheet- is your only option, I have no (simple)
suggestion. Others may have.

Best
Daniel

-- 
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?
*
*   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