dotnet / Open-XML-SDK

Open XML SDK by Microsoft
https://www.nuget.org/packages/DocumentFormat.OpenXml/
MIT License
4.05k stars 547 forks source link

Validation of Excel Strict files reports two errors #1190

Open Asbjoedt opened 2 years ago

Asbjoedt commented 2 years ago

Description

Validating any Strict conformance .xlsx spreadsheet results in 45 validation errors of which none should exist. I have already reported 43 of the errors in another issue, which are all related to the same issue, and now I report the last two errors.

Open XML SDK Validator gives the following two errors. Both files have been created with Excel, saved as Open XML Strict and nothing have been changed in them since, which for me logically should mean they are both valid, but the validator reports these two.

Can you do anything to correct this?

FILEPATH
--> File format is invalid - Spreadsheet has 45 validation errors
--> Error 1
----> Description: The 'dateCompatibility' attribute is not declared.
----> ErrorType: Schema
----> Node: DocumentFormat.OpenXml.Spreadsheet.WorkbookProperties
----> Path: /x:workbook[1]/x:workbookPr[1]
----> Part: /xl/workbook.xml
--> Error 2
----> Description: The element has unexpected child element 'http://schemas.openxmlformats.org/spreadsheetml/2006/main:start'. List of possible elements expected: <http://schemas.openxmlformats.org/spreadsheetml/2006/main:left>.
----> ErrorType: Schema
----> Node: DocumentFormat.OpenXml.Spreadsheet.Border
----> Path: /x:styleSheet[1]/x:borders[1]/x:border[1]
----> Part: /xl/styles.xml
----> Related Node: DocumentFormat.OpenXml.Spreadsheet.StartBorder
----> Related Node Inner Text:
mikeebowen commented 2 years ago

Thanks @Asbjoedt , I believe you're right, this is related to #1142 , which we are investigating. Unfortunately, it looks like fixing the invalid type issues will be a major change to the validation, so I can't give you a timeframe, but we are aware of the issue and will work on it as we can.