Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: writing a loop

From   Nick Cox <>
Subject   Re: st: writing a loop
Date   Thu, 20 Sep 2012 18:57:52 +0100

On Thu, Sep 20, 2012 at 6:41 PM, Amir Kasaeian <> 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:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index