Statalist The Stata Listserver


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

st: Re: creating a macro for files


From   Friedrich Huebler <[email protected]>
To   [email protected]
Subject   st: Re: creating a macro for files
Date   Thu, 20 Apr 2006 14:01:57 -0700 (PDT)

Excel (at least version 2003) does not expect a binary file. A
tab-delimited text file with the suffix .xls is opened by Excel
without problems. In fact, saving tab-delimited text files as .xls
with -outsheet- is a convenient shortcut that makes it possible to
open such files in Excel by double-clicking them in Windows Explorer.
It is not necessary to start Excel first and then go to File - Open
to run the import wizard.

Friedrich Huebler

--- Kit Baum <[email protected]> wrote:
> It is also worth mentioning that if you name a file .xls, Excel
> might  
> expect it to look like a binary spreadsheet file of type .xls. What
> outsheet creates is a text file, which you might name .txt, .csv,  
> etc. Excel will probably be happier reading the file if you make it
> clear that it is a text file. Stata does not write Excel-compatible
> binary files.
> 
> Kit Baum, Boston College Economics
> http://ideas.repec.org/e/pba1.html
> 
> 
> On Apr 20, 2006, at 2:33 AM, Nick wrote:
> 
> >> local i = 1
> >> foreach file in oilgs data2 data3 {
> >> 	use `file', clear
> >> 	outsheet using bra`i'.xls
> >> 	local ++i
> >> }


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
*
*   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