浏览代码

Set ApplyNumberFormat in handleNumFmtIdForXLSX

Fixes #158.
Peter Waller 10 年之前
父节点
当前提交
f11fb84af4
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      sheet.go

+ 3 - 0
sheet.go

@@ -277,6 +277,9 @@ func handleStyleForXLSX(style *Style, NumFmtId int, styles *xlsxStyleSheet) (XfI
 func handleNumFmtIdForXLSX(NumFmtId int, styles *xlsxStyleSheet) (XfId int) {
 func handleNumFmtIdForXLSX(NumFmtId int, styles *xlsxStyleSheet) (XfId int) {
 	xCellXf := makeXLSXCellElement()
 	xCellXf := makeXLSXCellElement()
 	xCellXf.NumFmtId = NumFmtId
 	xCellXf.NumFmtId = NumFmtId
+	if xCellXf.NumFmtId > 0 {
+		xCellXf.ApplyNumberFormat = true
+	}
 	XfId = styles.addCellXf(xCellXf)
 	XfId = styles.addCellXf(xCellXf)
 	return
 	return
 }
 }