On Thu, Sep 23, 2010 at 2:48 PM, Amanda Fu <mandy.fu1@gmail.com> 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.
Neil
--
"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 - nshephard@gmail.com
Website - http://slack.ser.man.ac.uk/
Photos - http://www.flickr.com/photos/slackline/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/