Closed luco5826 closed 2 years ago
As the title states, the OpenXML schema defines the CT_MergeCells type with the attribute count marked as optional
CT_MergeCells
count
File OfficeOpenXML-XMLSchema-Strict/sml.xsd
OfficeOpenXML-XMLSchema-Strict/sml.xsd
<xsd:complexType name="CT_MergeCells"> <xsd:sequence> <xsd:element name="mergeCell" type="CT_MergeCell" minOccurs="1" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="count" type="xsd:unsignedInt" use="optional"/> </xsd:complexType>
But xlnt uses it as required to check that the count of mergeCells is actually correct, throwing an exception when such attribute is not found:
https://github.com/tfussell/xlnt/blob/master/source/detail/serialization/xlsx_consumer.cpp#L859
The exception:
terminate called after throwing an instance of 'xml::parsing' what(): xl/worksheets/sheet5.xml:1:3365: error: attribute 'count' expected
Thanks for reporting this. I'll fix it soon.
I could open a PR for this issue by the end of the month, if it is helpful
As the title states, the OpenXML schema defines the
CT_MergeCells
type with the attributecount
marked as optionalFile
OfficeOpenXML-XMLSchema-Strict/sml.xsd
But xlnt uses it as required to check that the count of mergeCells is actually correct, throwing an exception when such attribute is not found:
https://github.com/tfussell/xlnt/blob/master/source/detail/serialization/xlsx_consumer.cpp#L859
The exception: