你好,
當使用setStyle時,setFormatter会失效,無法顯示小数值
如
var styleContentNumberRight = new GC.Spread.Sheets.Style();
styleContentNumberRight.hAlign = GC.Spread.Sheets.HorizontalAlign.right;
styleContentNumberRight.vAlign = GC.Spread.Sheets.VerticalAlign.center;
styleContentNumberRight.fontFamily = "Book Antiqua";
styleContentNumberRight.formatter = "#,##0.00";
sheet.setStyle(0, -1, styleContentNumberRight, GC.Spread.Sheets.SheetArea.viewport);
sheet.setFormatter(0, -1, '#,##0.00');
sheet.setValue(0, 4, parseFloat(50.18));
----------------------------------
單元格会出現50,而不是50.18, 若把sheet.setStyle注釋掉,就会出現50.18
請問我如何同时使用 setStyle 和 setFormatter,而保持小数值的顯示
|