We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Syncfusion.XlsIO: System.Xml.XmlException: 'Unexpected xml tag.'

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)




4 Replies 1 reply marked as answer

KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team February 2, 2023 11:12 AM UTC

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.

https://www.syncfusion.com/feedback/40645/unexpected-xml-tag-exception-is-thrown-while-parsing-an-external-link-containing


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.


Marked as answer

RB Rahul Balasundaram Syncfusion Team February 14, 2023 04:46 PM UTC

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



MM Matt Munyan March 23, 2023 04:12 PM UTC

I had this issue come up for a file, found this, and the NuGet package worked for me.



KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team March 24, 2023 10:51 AM UTC

Hi Matt,


We are glad that your issue is resolved.


Regards,

Keerthi.


Loader.
Up arrow icon