Thanks, BuiltinFormats looks exactly right, judging from the javadoc for that class at poi.apache.org/apidocs. And I can see the class via svn at http://svn.apache.org/repos/asf/poi/trunk/src/java/org/apache/poi/ss/usermodel/

But the distribution that I am using, poi-3.5-beta5, does not have that class in any of the jar files: poi-3.5-beta5-20090219.jar, poi-contrib-3.5-beta5-20090219.jar, poi-ooxml-3.5-beta5-20090219.jar and poi-scratchpad-3.5-beta5-20090219.jar.

Do I need to fetch some special jar? Is this by any chance a miss in the build script for these jars?

Anyhow I copied the version from SVN into my area and it seems to work pretty well.

Please advise on the path forward, thanks.

chris...

Nick Burch wrote:
On Tue, 19 May 2009, Chris Lott wrote:
The entry with numFmtId = 14 seems to be the style at index 1 that is referenced by the cell with the date value. Is this where the magic of formatting dates is buried? I sure don't see any local, custom format string in that styles table entry.

org.apache.poi.ss.usermodel.BuiltinFormats is probably the one you're looking for here

I tried calling DataFormatter#formatRawCellValue() passing it the double, short number format index, and null format string. Judging from the null-pointer exceptions I'm seeing, the formatRawCellValue() method needs a non-null format string.

Yup, I'd try it with the string you get back from BuiltinFormats for the ones where the Style Table doesn't have a custom one

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to