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: --insheet--reading an excel file where row 1,2 are variable names and labels

From   Neil Shephard <>
Subject   Re: st: --insheet--reading an excel file where row 1,2 are variable names and labels
Date   Thu, 23 Sep 2010 14:55:18 +0000

On Thu, Sep 23, 2010 at 2:48 PM, Amanda Fu <> wrote:

> Then my question is: is there any easy way to let Stata name the
> variables using first row and define labels using the second row when
> reading a data set from excel file?

No, Stata's -insheet- just doesn't work like that.

I'd remove the second row from your CSV file.  You can now -insheet,
names- (i.e. specify the -names- option when insheeting)  so your
first row of variable names is recognised, then write your do-file to
label these variables.


"One should as a rule, respect public opinion in so far as is
necessary to avoid starvation and to keep out of prison, but anything
that goes beyond this is voluntary submission to an unnecessary
tyranny, and is likely to interfere with happiness in all kinds of
ways..." - Bertrand Russell

Email -
Website -
Photos -
*   For searches and help try:

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