Bug 46772

Summary: Excel 2007 Cellformat is null
Product: POI Reporter: Oliver.Tribess
Component: XSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.5-dev   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: Sample XSSF and Java sample code for reproduce

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