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.

Thu Aug 17, 2017 6:04 am

Hi All,

there is Exception when I am trying load excel.
the error message is "Unable to cast object of type 'Spire.Xls.Core.Spreadsheet.Charts.XlsChart' to type 'Spire.Xls.Worksheet'."

below is my code
Workbook book = new Workbook();
book.LoadFromFile("sample.xls", false);

By the way, i use this spire soft which is 'spire.office-fe_2.15'.
if change type of the excel from xls to xlsx, so it's success when to load.
How to fix with loading xls file?

I look forward to your reply.
thanks a lot.
Attachments
sample.zip
(12.19 KiB) Downloaded 269 times

youvi_1123
 
Posts: 2
Joined: Tue Aug 15, 2017 7:07 am

Thu Aug 17, 2017 7:17 am

Hello,

Thanks for your inquiry.
Sorry for the inconvenience that our Free version caused. I have confirmed that your attached file worked well with the latest version of Spire.Office Platinum Version:2.16. Please apply it and try again.
In addition, we can offer you a 1-month free license to help remove the warning message. Please contact our sales team (sales@e-iceblue.com) to get it if you need.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Thu Aug 17, 2017 2:09 pm

Hello Jane,
Thanks for your reply.
I think i need to fix it via other way.
Maybe first change excel type from xls to xlsx, and then i use spire to load it.

youvi_1123
 
Posts: 2
Joined: Tue Aug 15, 2017 7:07 am

Fri Aug 18, 2017 3:26 am

Hello Lee Frank,

Thanks for your response.
Please feel free to contact us if you need any help while using our product.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Return to Spire.XLS

cron