Hello,
I'm experiencing an odd issue with ClosedXML: I cannot open an xlsx workbook if it contains comments on any cell AND has been saved by LibreOffice.
Comments saved by Microsoft Excel are fine, but if I take the same file, save it again (even without modifications) with LibreOffice, then the workbook cannot be opened anymore. Removing the comment with LibreOffice solves the issue.
It fails at the following line:
XLWorkbook workbook = new XLWorkbook(m_excelPath);
The error I get is the following:
'type' is a duplicate attribute name. Line 1, position 525.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.AttributeDuplCheck()
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(XmlReader reader)
at ClosedXML.Excel.XDocumentExtensions.Load(Stream stream)
at ClosedXML.Excel.XLWorkbook.LoadSpreadsheetDocument(SpreadsheetDocument dSpreadsheet)
at ClosedXML.Excel.XLWorkbook.LoadSheets(String fileName)
at ClosedXML.Excel.XLWorkbook.Load(String file)
at ClosedXML.Excel.XLWorkbook..ctor(String file, XLEventTracking eventTracking)
at ClosedXML.Excel.XLWorkbook..ctor(String file)
Right now we decided not to use comments, but it would be great if this could work as well.
Thanks in advance,
Martin
I'm experiencing an odd issue with ClosedXML: I cannot open an xlsx workbook if it contains comments on any cell AND has been saved by LibreOffice.
Comments saved by Microsoft Excel are fine, but if I take the same file, save it again (even without modifications) with LibreOffice, then the workbook cannot be opened anymore. Removing the comment with LibreOffice solves the issue.
It fails at the following line:
XLWorkbook workbook = new XLWorkbook(m_excelPath);
The error I get is the following:
'type' is a duplicate attribute name. Line 1, position 525.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.AttributeDuplCheck()
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(XmlReader reader)
at ClosedXML.Excel.XDocumentExtensions.Load(Stream stream)
at ClosedXML.Excel.XLWorkbook.LoadSpreadsheetDocument(SpreadsheetDocument dSpreadsheet)
at ClosedXML.Excel.XLWorkbook.LoadSheets(String fileName)
at ClosedXML.Excel.XLWorkbook.Load(String file)
at ClosedXML.Excel.XLWorkbook..ctor(String file, XLEventTracking eventTracking)
at ClosedXML.Excel.XLWorkbook..ctor(String file)
Right now we decided not to use comments, but it would be great if this could work as well.
Thanks in advance,
Martin