| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: precision: -insheet- & -outsheet-
On Apr 4, 2006, at 4:44 PM, [email protected] wrote:
Suppose I have an Excel file that contains large numbers that are
presented as scientific notation. Further suppose that I save said
Excel file as a comma-delimited file (.csv) then import into Stata
via -insheet-, along w/ the double option. After the insheet, an
examination of the data indicates that some degree of precision has
been lost -- rounding -- even after the variables have been
reformatted to reflect the length & desired format (e.g. %20.2fc).
From within Excel, save the worksheet in xml format. Then, from
within Stata, read it in using -xmluse-.
On the flip side, i.e. -outsheet-ing the data back into a .csv
file, is it necessary to format any numeric variables into non-
scientific notation format so as to retain the actual values of the
variables?
Yes, I believe -outsheet- does use the assigned display format.
-- Phil
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/