On Tue, 8 Feb 2011, John Francis wrote:
The problem comes with the numeric values. Here POI reads the values and sets the cell type to be CELL_TYPE_NUMERIC. This returns the value as a double. The trouble is the code '366.0' is not the same code as '366' so I wish to get the value 'as entered'. I appreciate that Excel may have decided to store the value internally as a double, and there is no way to get the value back 'as it appears'. Is this the case, or does POI have some access to a lower level value?
Generally if you type a number into a cell in excel, excel will store it as a double.
The DataFormatter class will probably do what you want though, as it tries to replicate the formatting rules in excel to be able to format numbers as strings in the same way excel does
Nick --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
