Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: precision: -insheet- & -outsheet-

From   Phil Schumm <[email protected]>
To   [email protected]
Subject   Re: st: precision: -insheet- & -outsheet-
Date   Tue, 4 Apr 2006 18:03:58 -0500

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:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index