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: writing a loop
From
"David Radwin" <[email protected]>
To
<[email protected]>
Subject
RE: st: writing a loop
Date
Thu, 20 Sep 2012 12:43:32 -0700 (PDT)
Nick's reply seems to have been cut off by the listserv, but I will add
that if you want actual Excel files, use -export excel- instead of
-outsheet-. See the help file for details.
David
--
David Radwin
Senior Research Associate
MPR Associates, Inc.
2150 Shattuck Ave., Suite 800
Berkeley, CA 94704
Phone: 510-849-4942
Fax: 510-849-0794
www.mprinc.com
> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Nick Cox
> Sent: Thursday, September 20, 2012 10:58 AM
> To: [email protected]
> Subject: Re: st: writing a loop
>
> On Thu, Sep 20, 2012 at 6:41 PM, Amir Kasaeian <[email protected]>
> wrote:
>
> > I wrote a loop for reading stata files and then export them in csv
> format.
> > Now, I want to export them in xls or xlsx formats, but I don't know
how.
> > How can I do this?
> > my codes are as follows:
> > How should I change it to do my work?
> >
> > forvalues i= 0/29{
> > use "C:\Step\Total88\Step`i'.dta", clear
> > outsheet using "C:\Step\Total88\Step`i'.csv", comma replace
> > }
*
* 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/