From | Ernest Berkhout <[email protected]> |
To | [email protected] |
Subject | Re: st: excel to stata / variable names shift to the value row |
Date | Mon, 28 Feb 2005 12:08:03 +0100 |
At 11:51 28/02/2005, Ron�n Conroy wrote:
You can force -insheet- to read the first line of the incoming file as names, using the -names- option. I cannot figure out why, on some occasions, Stata treats the first row as data, but let's face it, it does a pretty good job at guessing whether there are names there or not. Safest thing is to give the -names- option explicitly unless you can vouch for Stata's behaviour in advance.It happens mostly to me when the first column is a string variable. If the first row in a column is a string, it can be (A) a variable name OR (B) the first value of a string variable. If the second row is a string as well, then option (B) might probably be the most plausible for Stata.
© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |