From df91b34a3f816a865ba6f9ea7707c668552df9d6 Mon Sep 17 00:00:00 2001 From: xuri Date: Thu, 28 Apr 2022 15:33:25 +0800 Subject: This closes #1211, improve the compatibility with invalid internal styles count --- styles.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'styles.go') diff --git a/styles.go b/styles.go index c04ca3b..11f6f75 100644 --- a/styles.go +++ b/styles.go @@ -2443,7 +2443,7 @@ func setCellXfs(style *xlsxStyleSheet, fontID, numFmtID, fillID, borderID int, a if borderID != 0 { xf.ApplyBorder = boolPtr(true) } - style.CellXfs.Count++ + style.CellXfs.Count = len(style.CellXfs.Xf) + 1 xf.Alignment = alignment if alignment != nil { xf.ApplyAlignment = boolPtr(applyAlignment) -- cgit v1.2.1