Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Tue Nov 01, 2016 10:05 am

We have a solution that's been running Spire.XLS for several months now. The system populates an Excel template and stores the result in a PDF.

Everything worked brilliantly, until this week when we tried to update the template in Excel 2016. We made a minor change to the spreadsheet and now receive the exception below.

I validated the updated Excel file with the Microsoft Open XML SDK and no errors were found.

Any help would be greatly appreciated.

Code: Select all
System.Xml.XmlException was unhandled
  HResult=-2146232000
  LineNumber=0
  LinePosition=0
  Message=Unexpected xml tag.
  Source=Spire.XLS
  StackTrace:
       at spr4315.1(XmlReader A_0, XlsShape A_1, RelationsCollection A_2, String A_3, spr262 A_4, List`1 A_5, Dictionary`2 A_6)
       at spr4315.2(XmlReader A_0, XlsShape A_1, RelationsCollection A_2, String A_3, spr262 A_4, List`1 A_5, Dictionary`2 A_6)
       at spr4315.0(XmlReader A_0, XlsWorksheetBase A_1, String A_2, List`1 A_3, Dictionary`2 A_4)
       at spr4315.1(XmlReader A_0, XlsWorksheetBase A_1, String A_2, List`1 A_3, Dictionary`2 A_4)
       at spr4315.4(XmlReader A_0, XlsWorksheetBase A_1, String A_2, List`1 A_3, Dictionary`2 A_4)
       at spr511.0(XlsWorksheetBase A_0, spr5002 A_1, Dictionary`2 A_2)
       at spr511.0(XlsWorksheetBase A_0, String A_1, Dictionary`2 A_2)
       at spr4315.0(XmlReader A_0, XlsWorksheet A_1, Dictionary`2 A_2)
       at spr4315.0(XmlReader A_0, XlsWorksheet A_1, MemoryStream& A_2, String A_3, Dictionary`2 A_4)
       at spr4315.0(XmlReader A_0, XlsWorksheet A_1, String A_2, MemoryStream& A_3, MemoryStream& A_4, List`1 A_5, Dictionary`2 A_6, Dictionary`2 A_7)
       at spr511.1(XlsWorksheet A_0, Dictionary`2 A_1)
       at Spire.Xls.Core.Spreadsheet.XlsWorksheet.ParseData(Dictionary`2 dictUpdatedSSTIndexes)
       at spr4315.0(Dictionary`2 A_0)
       at spr262.0(List`1& A_0)
       at spr262.1(List`1& A_0)
       at Spire.Xls.Core.Spreadsheet.XlsWorkbook.0(Stream A_0, String A_1)
       at Spire.Xls.Core.Spreadsheet.XlsWorkbook.0(Stream A_0, String A_1, ExcelVersion A_2, ExcelParseOptions A_3)
       at Spire.Xls.Core.Spreadsheet.XlsWorkbook.0(String A_0, String A_1, ExcelVersion A_2, ExcelParseOptions A_3)
       at Spire.Xls.Core.Spreadsheet.XlsWorkbook..ctor(spr2469 A_0, Object A_1, String A_2, ExcelParseOptions A_3, Boolean A_4, String A_5, ExcelVersion A_6)
       at spr846.0(Object A_0, String A_1, ExcelParseOptions A_2, Boolean A_3, String A_4, ExcelVersion A_5)
       at spr995.0(String A_0, ExcelParseOptions A_1, Boolean A_2, String A_3, ExcelVersion A_4)
       at Spire.Xls.Workbook.LoadFromFile(String fileName, ExcelVersion version)
       at Spire.Xls.Workbook.LoadFromFile(String fileName)
       at OpenXmlValidation.Program.Main(String[] args) in C:\Dev\OpenXmlValidation\OpenXmlValidation\Program.cs:line 31
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

ahaupt@gmail.com
 
Posts: 3
Joined: Tue Jul 19, 2016 10:18 am

Tue Nov 01, 2016 10:49 am

The element causing the problem is an embedded picture.

I suspect the real underlying issue is that FreeSpire.XLS 7.9 only supports Excel versions up to 2013.

When I save the file (using Excel 2016) as an 97-2003 XLS file, the problem is resolved.

ahaupt@gmail.com
 
Posts: 3
Joined: Tue Jul 19, 2016 10:18 am

Wed Nov 02, 2016 1:47 am

Hi,

Thanks for your information.
Spire.XLS is compatible with Excel 2016.
Could you please provide us the sample file which has issue ? That would be very helpful to investigate this issue.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Sun Nov 06, 2016 7:37 pm

Email with Excel sheet sent.

ahaupt@gmail.com
 
Posts: 3
Joined: Tue Jul 19, 2016 10:18 am

Wed Nov 23, 2016 8:04 am

Hi, i have the same issue.

Is there any news about a correction?

Best regards

kiramus@hotmail.com
 
Posts: 1
Joined: Wed Nov 23, 2016 8:02 am

Wed Nov 23, 2016 8:15 am

Hi,

Thanks for posting.
The above issue has been resolved in the latest Spire.XLS Pack Hotfix Version:7.11.13. Please try to use this version, if the issue still exists, please provide us sample file for investigation.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Nov 30, 2016 7:47 am

Hi kiramus@hotmail.com,

How is the issue now ? Could you please give us some feedback at your convenience ?

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Dec 07, 2016 6:27 am

Hello Betsy,


Is this hotfix going to be applied in the FreeSpire.XLS library as well? I'm getting this exception too for the same reason reported by ahaupt (an embedded image in the spreadsheet).


Regards,
wingb

wingb
 
Posts: 1
Joined: Wed Dec 07, 2016 6:21 am

Wed Dec 07, 2016 6:35 am

Dear wingb,

THanks for your inquiry.
So sorry that at present we don't have any plan to update/maintain free version. So please try to use the Spire.XLS Pack Hotfix Version:7.11.13.
If the issue still exists, please provide us sample file for investigation.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.XLS