Statalist The Stata Listserver

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

st: Re: creating a macro for files

From   Kit Baum <>
Subject   st: Re: creating a macro for files
Date   Thu, 20 Apr 2006 16:46:38 -0400

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

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
*   For searches and help try:

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