Skip to content
This repository was archived by the owner on Aug 26, 2022. It is now read-only.

Commit 56d561a

Browse files
authored
Fix the count attribute of the numFmts element (#36)
Somehow it was off by one for no reason.
1 parent 212ae44 commit 56d561a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Simplexcel/XlsxInternal/StyleWriter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ private static void StyleAddCellStyleXfsElement(XDocument doc)
173173

174174
private static void StyleAddNumFmtsElement(XDocument doc, List<string> numberFormats)
175175
{
176-
var numFmtsElem = new XElement(Namespaces.workbook + "numFmts", new XAttribute("count", numberFormats.Count + 1));
176+
var numFmtsElem = new XElement(Namespaces.workbook + "numFmts", new XAttribute("count", numberFormats.Count));
177177

178178
for (int i = 0; i < numberFormats.Count; i++)
179179
{

0 commit comments

Comments
 (0)