<changes>
<release version="3.8-beta6" date="2012-??-??">
+ <action dev="poi-developers" type="fix">52369 - Event based XSSF parsing should handle formatting of formula values in XSSFSheetXMLHandler</action>
<action dev="poi-developers" type="fix">52348 - Avoid exception when creating cell style in a workbook that has an empty xf table</action>
<action dev="poi-developers" type="fix">52219 - fixed XSSFSimpleShape to set rich text attributes from XSSFRichtextString</action>
<action dev="poi-developers" type="fix">52314 - enhanced SheetUtil.getColumnWidth</action>
if(formulasNotResults) {
thisStr = formula.toString();
} else {
- thisStr = value.toString();
+ String fv = value.toString();
+
+ if (this.formatString != null) {
+ try {
+ // Try to use the value as a formattable number
+ double d = Double.parseDouble(fv);
+ thisStr = formatter.formatRawCellContents(d, this.formatIndex, this.formatString);
+ } catch(NumberFormatException e) {
+ // Formula is a String result not a Numeric one
+ thisStr = fv;
+ }
+ } else {
+ // No formatter supplied, just do raw value in all cases
+ thisStr = fv;
+ }
}
break;