Summary: | Incorrect ordering in formats of BuiltinFormats.java | ||
---|---|---|---|
Product: | POI | Reporter: | choonbong.shin <intel2> |
Component: | SS Common | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 3.16-FINAL | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All | ||
Attachments: | result in excel and MS Internal Format List |
Thank you for raising this. Will fix shortly. |
Created attachment 34960 [details] result in excel and MS Internal Format List Hi. I used poi library(ver 3.12) to create xls file. And I've found a bug. I noticed that when a xls file is created using POI, the default style for the button "Comma Style" results in the format which includes the currency symbol("$"). Checking the source(in file BuiltinFormats.java), where internal formats are defined, I found the following, putFormat(m, 0x29, "_(\"$\"* #,##0_);_(\"$\"* (#,##0);_(\"$\"* \"-\"_);_(@_)"); putFormat(m, 0x2a, "_(* #,##0_);_(* (#,##0);_(* \"-\"_);_(@_)"); But in excel's internal format list, two entries are 0x29 _(* #,##0_);_(* (#,##0);_(* "-"_);_(@_) 0x2a _($* #,##0_);_($*(#,##0);_($* "-"_);_(@_) Even in comments of BuiltinFormats.java, there are * 0x29, "_(* #,##0_);_(* (#,##0);_(* \"-\"_);_(@_)"<br/> * 0x2a, "_($* #,##0_);_($* (#,##0);_($* \"-\"_);_(@_)"<br/> So you have to fix this part. * ps : It is same in 3.16.