Browse Source

Merge pull request #162 from pwaller/issue-158

Set ApplyNumberFormat in handleNumFmtIdForXLSX
Geoffrey J. Teale 10 years ago
parent
commit
b0bca2519c
1 changed files with 3 additions and 0 deletions
  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) {
 	xCellXf := makeXLSXCellElement()
 	xCellXf.NumFmtId = NumFmtId
+	if xCellXf.NumFmtId > 0 {
+		xCellXf.ApplyNumberFormat = true
+	}
 	XfId = styles.addCellXf(xCellXf)
 	return
 }