Bug 46772 - Excel 2007 Cellformat is null
Summary: Excel 2007 Cellformat is null
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.5-dev
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-26 06:53 UTC by Oliver.Tribess
Modified: 2009-03-01 08:28 UTC (History)
0 users



Attachments
Sample XSSF and Java sample code for reproduce (21.92 KB, application/x-zip-compressed)
2009-02-26 06:53 UTC, Oliver.Tribess
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver.Tribess 2009-02-26 06:53:48 UTC
Created attachment 23315 [details]
Sample XSSF and Java sample code for reproduce

Hi,

I tryed to read a Excel 2007 OOXML file with some different cellformats, when I wonder why some dates will be formated wrong.
POI returns for the following formats null as FormatString:
- default value cell (thats the first cell-format-option in excel, called default)
- h:mm:ss AM/PM
- default date cell (thats the first cell-format-option unter the menu date)
- ...
So I can't modify any Formatter because there is no Format returned.
If you run the java sample attached, you will see that a lot of formats returned null.


My sample-xlsx and the java sample code is attached.
Excel-file created with Excel 2007, german version
Used: POI 3.5 Beta4


Cheers

Oliver
Comment 1 Yegor Kozlov 2009-03-01 08:28:12 UTC
Fixed in r749054

Those missing formats are built-in data formats that are implied rather than explicitly saved in the file. 

Regards,
Yegor