Hi,
I get an 'Unexpected xml tag.' XmlException when opening a certain Excel file using Syncfusion.XlsIO.Portable.dll (20.3.0.47). Is there a way to figure out what is wrong?
grt
System.Xml.XmlException
HResult=0x80131940
Message=Unexpected xml tag.
Source=Syncfusion.XlsIO.Portable
StackTrace:
at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseExternalWorkbook(XmlReader reader, RelationCollection relations)
at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseExternalLink(XmlReader reader, RelationCollection relations)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.ParseExternalLink(String relationId)
at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseExternalLinkWorkbookPart(XmlReader reader)
at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseExternalLinksWorkbookPart(XmlReader reader)
at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseWorkbook(XmlReader reader, RelationCollection relations, FileDataHolder holder, String bookPath, Stream streamStart, Stream streamEnd, List`1& lstBookViews, Stream functionGroups, List`1& lstCustomBookViews)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.ParseWorkbook(List`1& themeColors, Boolean parseOnDemand)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.ParseDocument(List`1& themeColors, Boolean parseOnDemand)
at Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseExcel2007Stream(Stream stream, String password, Boolean parseOnDemand)
at Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseStream(Stream stream, String password, ExcelVersion version, ExcelParseOptions options)
at Syncfusion.XlsIO.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, Stream stream, ExcelParseOptions options, ExcelVersion version)
at Syncfusion.XlsIO.Implementation.ApplicationImpl.CreateWorkbook(Object parent, Stream stream, ExcelVersion version, ExcelParseOptions options)
at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(Stream stream, ExcelVersion version, ExcelParseOptions options)
at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(Stream stream, ExcelVersion version)
Robert, we are able to reproduce the reported issue and confirmed it as Unexpected XML tag exception is thrown while parsing an external link containing an alternateUrls tag and logged a defect report. We will include the fix for this issue in our weekly NuGet release scheduled for February 14th, 2023.
You can track the status of this defect report through below feedback link.
Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.
Robert, we have included the fix for Unexpected XML tag exception is thrown while parsing an external link containing an alternateUrls tag in our weekly NuGet release version 20.4.0.50. Kindly upgrade your package to this version and let us know if the issue is resolved.
Latest NuGet Package: https://www.nuget.org/packages/Syncfusion.XlsIO.Wpf/20.4.0.50
I had this issue come up for a file, found this, and the NuGet package worked for me.
Hi Matt,
We are glad that your issue is resolved.
Regards,
Keerthi.