The xfId attribute is meaningless in cellStyleXfs collections. The xf record is also used in the cellXfs collection where xfId is an index into cellStyleXfs.
If you load a generated file into Excel and save it the xfId is stripped out of cellStyleXfs elements.
Unfortunately, inclusion of the xfId attribute in the cellStyleXfs collection can cause other applications to fail. Spotfire will not read a file created with NPOI. Spotfire uses Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parse which will crash if an xfId is present on xf records in a cellStyleXfs colllection. Spotfire will read files once the fix in this PR is applied.
This fix removes the
xfId
attribute fromxf
elements in thecellStyleXfs
collection.When writing the
styles.xml
file NPOI includes axfId
attribute in thexf
elements of the cell style format collectionThe
xfId
attribute is meaningless incellStyleXfs
collections. Thexf
record is also used in thecellXfs
collection wherexfId
is an index intocellStyleXfs
.If you load a generated file into Excel and save it the
xfId
is stripped out ofcellStyleXfs
elements.Unfortunately, inclusion of the
xfId
attribute in thecellStyleXfs
collection can cause other applications to fail. Spotfire will not read a file created with NPOI. Spotfire usesSyncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parse
which will crash if anxfId
is present onxf
records in acellStyleXfs
colllection. Spotfire will read files once the fix in this PR is applied.