Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Question for Statalist about "Creating a macro for files"


From   "Riano, Juanita" <[email protected]>
To   <[email protected]>
Subject   st: Question for Statalist about "Creating a macro for files"
Date   Wed, 19 Apr 2006 12:23:33 -0400

Hi all, 

I am trying to use the foreach command to "outsheet" five statafiles
into 5 excel files but don't know how to create the two lists. 

So far I have this...

#delimit; 
foreach file in oilgs.dta  data2.dta data3.dta {;
outsheet using bra1.xls bra2.xls bra3.xls , replace;
};
 

But it doesn't recognize the list of  xls files 


Thank you

---------------------------------------------
Juanita Riano
International Monetary Fund
Research Department
[email protected]
phone 202-623-5437


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index