cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "neil" <>
Subject POI and date formula
Date Tue, 19 Aug 2003 06:58:11 GMT
With cocoon-2.1m3 I'm sure poi used to handle this fine:
  <gmr:Cell ValueType="40" Row="7" Col="18">=DATE(2001, 01, 01)</gmr:Cell>
and excel would show the date in a cell with whatever date format we had set up.

But now with cocoon-2.1 we're now getting:

org.apache.cocoon.CascadingIOException: Invalid value for a numberic cell: =DATE(2001, 01,
01): java.text.ParseException:
Unparseable number: "=DATE(2001, 01, 01)"
	at org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.Cell.setContent(

If we use ValueType="60" (String) we see the formula displayed as a string in excel
instead of a date (as you'd expect).

Our work around is to convert the date/time to days since 1/1/1901 and use that instead.

I've read somewhere that at least some versions of excel sometimes use 1/1/1904
instead of 1/1/1901 as the base date, so maybe the workaround won't always work
(only ms can afford not to be ms compatible).

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message