https://bz.apache.org/bugzilla/show_bug.cgi?id=65245
Bug ID: 65245
Summary: In Excel97-2003(xls), [¥300] is incorrectly output as
[$300]
Product: POI
Version: 5.0.0-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 37810
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37810&action=edit
sample code
In detail,
According to the suffix of Excel file, [apache tika] will automatically read
the contents of the Excel file.
callStacks:
org\apache\tika\parser\microsoft\OfficeParser.#parse
org\apache\tika\parser\microsoft\TikaHSSFListener#parse
org\apache\tika\parser\microsoft\TikaHSSFListener#processFile
poi-5.0.0.jar!\org\apache\poi\hssf\eventusermodel\HSSFEventFactory.class#processEvents
poi-5.0.0.jar!\org\apache\poi\hssf\eventusermodel\HSSFEventFactory.class#genericProcessEvents
poi-5.0.0.jar!\org\apache\poi\hssf\eventusermodel\HSSFRequest.class#processRecord
poi-5.0.0.jar!\org\apache\poi\hssf\eventusermodel\FormatTrackingHSSFListener.classFormatTrackingHSSFListener#processRecord
In Excel97-2003(xls),
When [Format Cells > Number > Currency > Negative numbers] is set to [¥-1,234]
or [(RED)¥-1,234],
there will be a problem that [¥300] is read incorrectly as [$300].
The reason is that the Formatindex value of[¥- 1,234] and [(RED)¥-1,234] are
[5] and [6],
but the Formatindex values below 50 belong to [Custom] types.
The Formatindex and FormatString of [Custom] are as follows:
5--> "\"$\"#,##0_);(\"$\"#,##0)",
6--> "\"$\"#,##0_);[Red](\"$\"#,##0)",
Please refer to the attachment for sample code.
--
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]