Merover a écrit :
Hi
Hi,
I am using jOpenDocument to retrieve values from a large number of ods files. One of the values in each file is a part number which in some cases returns as a string and in some other cases returns as a float.
Can you please send your file, this usually means that some of your cells have the wrong type (i.e. Number instead of String).
If it returns as a float I have problems with the precision. For example, if the part number is 60001399 it will return as 6.00014E+7 which if I convert it to a string results in 60001400. Any ideas what I can do about it? I have tried to return it into a double but that's only giving me an cast exception.
If that's what I think it is, you should just have to tell OpenOffice to treat your cells as text. Anyway there's a new method in svn to retrieve the text value of any cell : getTextValue().
Thanks for an otherwise great library. This small project of mine wouldn't be possible without it. /M
Thanks Cheers, Sylvain