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 list to .txt or excel file
From
Friedrich Huebler <[email protected]>
To
[email protected]
Subject
Re: st: export list to .txt or excel file
Date
Mon, 2 Aug 2010 11:26:50 -0400
Toby,
Try this.
local size1 : list sizeof onlytraded
local size2 : list sizeof onlynew
clear
local obs = max(`size1',`size2')
set obs `obs'
gen onlytraded = ""
gen onlynewn = ""
local i = 1
foreach o of local onlytraded {
replace onlytraded = "`o'" in `i'
local i = `i' + 1
}
local i = 1
foreach o of local onlynew {
replace onlynew = "`o'" in `i'
local i = `i' + 1
}
outsheet using data.txt
Friedrich
On Mon, Aug 2, 2010 at 10:19 AM, Hobst <[email protected]> wrote:
> Hello Statalists
>
> I am working with the following code
>
> levelsof Traded_Model, local(traded) levelsof NewModel, local(new) local
> onlytraded : list traded - new local onlynew : list new - traded
>
> now i would like to export the lists "onlytraded" and "onlynew" to use it in
> excel (so i need a .txt, .csv, .xls or whatever)..
>
> Has somebody a suggestion how i could do that?
>
> Thank you in advance for your much appreciated help.
>
> Regards
> Toby
*
* 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/