You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2016/08/25 11:58:55 UTC
[Bug 60044] New: Regression in currency formatting for at least some
xls in trunk
https://bz.apache.org/bugzilla/show_bug.cgi?id=60044
Bug ID: 60044
Summary: Regression in currency formatting for at least some
xls in trunk
Product: POI
Version: 3.15-dev
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P2
Component: SS Common
Assignee: dev@poi.apache.org
Reporter: tallison@mitre.org
Created attachment 34173
--> https://bz.apache.org/bugzilla/attachment.cgi?id=34173&action=edit
example file
On https://issues.apache.org/jira/browse/TIKA-2013, I noticed a regression in
currency formatting in at least some xls files when comparing 3.15-beta1 with
3.15-beta3-rc1.
I confirmed that this is a poi-level issue, not something that we're botching
in Tika.
XLS2CSVmra results with trunk:
,"Apple Day",$963.01,$7,61,$12,96,$8,99,$6,71,$8,09,$4,27,$3,98,$2,80,
,"Bingo",$1,184.00,$8,67,$18,69,,,,,,,
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 60044] Regression in currency formatting for at least some xls
in trunk
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60044
--- Comment #1 from Javen O'Neal <on...@apache.org> ---
Could you provide a diff of the beta1 and beta3-rc1 output or a unit test to
make it easier to find the breaking change?
There were some changes to DataFormatter between these releases that improved
POI's locale-specific number formatting (comma is used as decimal separator
rather than a period).
My guess is that this commit [1] caused the regression. Can't quote the numbers
as that would give a string. Either change Xls2Csv to set the locale to format
with a period separator when the document's locale or the machine's locale use
comma decimal separator, or escape the commas and hope the CSV consumer knows
how to unescape it.
[1] https://svn.apache.org/viewvc?view=revision&revision=1747139
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 60044] Regression in currency formatting for at least some xls
in trunk
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60044
--- Comment #3 from PJ Fanning <fa...@yahoo.com> ---
For CSV output, wouldn't it be better not to use thousands separators at all?
That is, $1,184.00 could be written as $1184.00.
Otherwise, to keep the comma separator for the thousands would require the
value to appear in double quotes ("$1,184.00").
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 60044] Regression in currency formatting for at least some xls
in trunk
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60044
--- Comment #2 from Javen O'Neal <on...@apache.org> ---
> $1,184.00
Looks like thousands separator commas need to be striped as well.
Question for folks who are used to seeing numbers with comma decimal
separators: how are CSV files usually read and written? Are numbers represented
with period decimal separators?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 60044] Regression in currency formatting for at least some xls
in trunk
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60044
Tim Allison <ta...@mitre.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Tim Allison <ta...@mitre.org> ---
r1760102
I didn't bother adding a unit test because this seems like such a small issue.
Please reopen if we need a test.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 60044] Regression in currency formatting for at least some xls
in trunk
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60044
--- Comment #4 from Tim Allison <ta...@mitre.org> ---
Looks like this is caused by a typo in
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java?r1=1721901&r2=1747325
-putFormat(m, 7, "\"$\"#,##0.00_);(\"$\"#,##0.00)");
+"\"$\"#,##,00_);(\"$\"#,##0.00)",
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org