diff options
author | Ri Xu <xuri.me@gmail.com> | 2017-08-07 10:42:10 +0800 |
---|---|---|
committer | Ri Xu <xuri.me@gmail.com> | 2017-08-07 10:42:10 +0800 |
commit | 5cf3725f026d2a1dbf3208d575ade996cfd7e7ec (patch) | |
tree | 89dbfb3b9d580109654fa9728e9b46f8729040d5 | |
parent | 6626a26f7baca10773f4066de47a811a8a89d236 (diff) |
Add missing element `xfId` of the styles to fix issue #93.
-rw-r--r-- | styles.go | 2 | ||||
-rw-r--r-- | xmlStyles.go | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -2122,6 +2122,8 @@ func setCellXfs(style *xlsxStyleSheet, fontID, numFmtID, fillID, borderID int, a style.CellXfs.Count++ xf.Alignment = alignment xf.ApplyAlignment = applyAlignment + xfID := 0 + xf.XfID = &xfID style.CellXfs.Xf = append(style.CellXfs.Xf, xf) return style.CellXfs.Count - 1 } diff --git a/xmlStyles.go b/xmlStyles.go index e8aaef6..43bf945 100644 --- a/xmlStyles.go +++ b/xmlStyles.go @@ -211,7 +211,7 @@ type xlsxXf struct { NumFmtID int `xml:"numFmtId,attr"` PivotButton bool `xml:"pivotButton,attr,omitempty"` QuotePrefix bool `xml:"quotePrefix,attr,omitempty"` - XfID *int `xml:"xfId,attr,omitempty"` + XfID *int `xml:"xfId,attr"` Alignment *xlsxAlignment `xml:"alignment"` Protection *xlsxProtection `xml:"protection"` } |