You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Miroslav Šulc <mi...@startnet.cz> on 2006/11/02 00:36:38 UTC
HSSF and reading dates
Hi,
how can one know that given cell contains date value and not just a
double value? I'm interested in solution using latest poi sources.
Miroslav
Re: HSSF and reading dates
Posted by Miroslav Šulc <mi...@startnet.cz>.
The file I run it on is created in OpenOffice but I think it shouldn't
matter. I just found that "standard number" format (data format 164) is
taken as date and a date format (data format 165) is taken as number.
I think it would be safer to get the formatting string and check for
date formatters rather then guess the numbers because it will not cover
user defined date/time formats. I wanted to get the formatting string to
see if this solution could work but don't know how to get Workbook
object from HSSFWorkbook so I cannot play with HSSFDataFormat.
Miroslav
Paul Häder wrote:
> The only advice I can give you, is log the values for the cells w/
> false positives and take those out of the patched method. It would be
> also cool, if you wrote something about your findings on the
> aforementioned bugzilla page.
>
> -Paul
>
> Miroslav Šulc wrote:
>
>> Paul,
>>
>> thank you for the link. It seems the patch causes false positives :-(
>>
>> Miroslav
>>
>> Paul Häder wrote:
>>
>>
>>> Miroslav,
>>>
>>> you might want to look at this bug:
>>> http://issues.apache.org/bugzilla/show_bug.cgi?id=40128.
>>>
>>> Cheers,
>>> Paul
>>>
>>> Miroslav Šulc wrote:
>>>
>>>
>>>> Hi,
>>>>
>>>> how can one know that given cell contains date value and not just a
>>>> double value? I'm interested in solution using latest poi sources.
>>>>
>>>> Miroslav
>>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> Mailing List: http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
>
Re: HSSF and reading dates
Posted by Paul Häder <ph...@freightgate.com>.
The only advice I can give you, is log the values for the cells w/ false
positives and take those out of the patched method. It would be also
cool, if you wrote something about your findings on the aforementioned
bugzilla page.
-Paul
Miroslav Šulc wrote:
>Paul,
>
>thank you for the link. It seems the patch causes false positives :-(
>
>Miroslav
>
>Paul Häder wrote:
>
>
>>Miroslav,
>>
>>you might want to look at this bug:
>>http://issues.apache.org/bugzilla/show_bug.cgi?id=40128.
>>
>>Cheers,
>>Paul
>>
>>Miroslav Šulc wrote:
>>
>>
>>
>>>Hi,
>>>
>>>how can one know that given cell contains date value and not just a
>>>double value? I'm interested in solution using latest poi sources.
>>>
>>>Miroslav
>>>
>>>
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
Re: HSSF and reading dates
Posted by Miroslav Šulc <mi...@startnet.cz>.
Paul,
thank you for the link. It seems the patch causes false positives :-(
Miroslav
Paul Häder wrote:
> Miroslav,
>
> you might want to look at this bug:
> http://issues.apache.org/bugzilla/show_bug.cgi?id=40128.
>
> Cheers,
> Paul
>
> Miroslav Šulc wrote:
>
>> Hi,
>>
>> how can one know that given cell contains date value and not just a
>> double value? I'm interested in solution using latest poi sources.
>>
>> Miroslav
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> Mailing List: http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
>
Re: HSSF and reading dates
Posted by Paul Häder <ph...@freightgate.com>.
Miroslav,
you might want to look at this bug:
http://issues.apache.org/bugzilla/show_bug.cgi?id=40128.
Cheers,
Paul
Miroslav Šulc wrote:
>Hi,
>
>how can one know that given cell contains date value and not just a
>double value? I'm interested in solution using latest poi sources.
>
>Miroslav
>
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/