https://bz.apache.org/bugzilla/show_bug.cgi?id=65644
Bug ID: 65644
Summary: [PATCH] Improved regex for Excel accounting formats
Product: POI
Version: 4.1.2-FINAL
Hardware: PC
Status: NEW
Severity: major
Priority: P2
Component: SS Common
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 38074
--> https://bz.apache.org/bugzilla/attachment.cgi?id=38074&action=edit
Patch file for CellFormat.java and TestCellFormatter.java
Excel uses the following format codes under Format Cells > Number > Accounting
R English (South Africa) (0 decimal places)
"_-[$R-1C09]* #,##0_-;\-[$R-1C09]* #,##0_-;_-[$R-1C09]*
"-"??_-;_-@_-"
USD (0 decimal places)
"_([$USD]\ * #,##0_);_([$USD]\ * \(#,##0\);_([$USD]\ * "-"_);_(@_)"
POI handles [$x-xxx] but not [$x-xxxx] or [$xxx].
The provided .patch file
1. Improves upon the regex used by handling these 2 different formats.
2. Extends accounting test case to include these scenarios.
Found in version 4.2.1; affects latest.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]