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: Export lists to excel


From   Ronnie Babigumira <[email protected]>
To   [email protected]
Subject   Re: st: Export lists to excel
Date   Fri, 31 Aug 2012 14:51:32 +0200

Damian

Here are two of many ways you could do this 

** A ***
sysuse auto, clear
keep if rep78 == 1
keep make price mpg rep78
export excel using test_excel



** B (shorter) **
sysuse auto, clear
outsheet make price mpg rep78 using test.txt if rep78 == 1, comma


B may be easier if you are exporting many "lists". It creates comma delimited text files that can easily be opened in MS Excel (or word processors)

Hope this helps

Ronnie

PS: If your final goal is to move the "lists" from excel to word, you should look at -listtex- (ssc install listtex) 

-- 
010100100110111101101110011011100110100101100101




On Friday, August 31, 2012 at 2:38 PM, Damian Finlayson wrote:

> I am using StataIC 12.
> 
> By lists I mean I am using the - list - command e.g:
> 
> list var1 var2 var3 var6 var8 if var 3== x
> 
> However, it seems that the - list - command cannot be combined with -
> export excel -
> 
> 
> On 31 August 2012 12:26, Ronnie Babigumira <[email protected] (mailto:[email protected])> wrote:
> > What version of Stata are you using? In Stata 12 -help export excel-
> > 
> > Ps: What do you mean by lists?
> > 
> > --
> > 010100100110111101101110011011100110100101100101
> > 
> > 
> > 
> > 
> > On Friday, August 31, 2012 at 1:22 PM, Damian Finlayson wrote:
> > 
> > > Hi,
> > > 
> > > A really simple question, I cannot seem to find the necessary stata
> > > command for.
> > > 
> > > I have created a number of lists using Stata which I then copy and
> > > paste into excel (and have to reformat in the process). Is there a
> > > way to get Stata to place lists in excel?
> > > 
> > > I have tried using the tabout function - however this seems limited to
> > > two maybe three variables (whereas my lists would consist of 8/9
> > > variables).
> > > 
> > > Many thanks,
> > > 
> > > Damian
> > > *
> > > * For searches and help try:
> > > * http://www.stata.com/help.cgi?search
> > > * http://www.stata.com/support/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/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/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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