Summary: | In Excel97-2003(xls), [¥300] is incorrectly output as [$300] | ||
---|---|---|---|
Product: | POI | Reporter: | Yin WeiLi <wlyin> |
Component: | HSSF | Assignee: | POI Developers List <dev> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 5.0.0-FINAL | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All | ||
Attachments: |
sample code
sample code2 test results |
Can you try setting the user-local via LocalUtil.setUserLocale() to see if the local set locale affects this? Created attachment 37838 [details]
sample code2
Created attachment 37839 [details]
test results
Thank you for your proposal. I tried the method you mentioned, but it still doesn't work. Please refer to the attachment [sample2] and [poi] for sample code. |
Created attachment 37810 [details] 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.