DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=30319>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=30319 Unicode in usermodel DataFormat (+ FIX) Summary: Unicode in usermodel DataFormat (+ FIX) Product: POI Version: 2.5 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: HSSF AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I couldn't get the euro symbol to work in a DataFormat. The formatting String that Excel uses for the "Financial, EU 123" format is: "_([$\u20ac-2]\\ * #,##0.00_);_([$\u20ac-2]\\ * \\(#,##0.00\\);_([$\u20ac-2]\\ * \"-\"??_);_(@_)" I could read this with the HSSF usermodel classes from a workbook created by Excel, but when trying to create a workbook the character would change into a logical-not symbol. After some searching in the hssf.record package I found the class FormatRecord which has a method setUnicodeFlag, but this method isn't called when the usermodel creates a DataFormat. I fixed it by changing the class org.apache.poi.hssf.model.Workbook (not HSSFWorkbook) In its method "public short createFormat( String format )" I added the line: rec.setUnicodeFlag( true ); After this change, euro symbols work fine in a DataFormat. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
