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: writing a loop


From   Amir Kasaeian <[email protected]>
To   [email protected]
Subject   st: writing a loop
Date   Thu, 20 Sep 2012 10:41:46 -0700 (PDT)

Dear stata list,

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
} 

I also have several other questions that I will ask.
Your help will be appreciated.
Thanks

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