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 Oct 15, 2019 7:43 am

Hi i am using spire.xls for my windows service and it is working fine but after running for one or two days it gives me error and we are just reading the data from excel sheet which exists only one worksheet
Error:
Exception Message:Object reference not set to an instance of an object.
StackTrace: at Spire.Xls.Workbook.get_Worksheets()

omerobaid
 
Posts: 3
Joined: Tue Oct 15, 2019 7:35 am

Tue Oct 15, 2019 9:33 am

Hi,

Thanks for your inquiry.
To help us investigate your issue accurately, please offer us the following information.
1. Your input Excel file.
2. The code you were using which could reproduce your issue directly.
You could upload them here or send us(support@e-iceblue.com) via email.

Best wishes,
Amber
E-iceblue support team
User avatar

Amber.Gu
 
Posts: 525
Joined: Tue Jun 04, 2019 3:16 am

Tue Oct 15, 2019 10:13 am

Please check I've sent an email

omerobaid
 
Posts: 3
Joined: Tue Oct 15, 2019 7:35 am

Wed Oct 16, 2019 3:00 am

Hi,

Thanks for your information via email.
I used the latest Spire.XLS (Spire.XLS Pack(Hotfix) Version:9.10.4) to test your file and code, but didn’t reproduce your issue. If you were using an old version, I firstly suggest you try to use the latest one which has more improvements than old versions.
If the issue still exists after trying, please provide your testing environment, such as OS information (E.g. Win7, 64bit) and Region setting (E.g. China, Chinese) to help us further investigate it.

Best wishes,
Amber
E-iceblue support team
User avatar

Amber.Gu
 
Posts: 525
Joined: Tue Jun 04, 2019 3:16 am

Wed Oct 16, 2019 6:02 am

Yes I am using latest version, But it works fine at start but after one day it will give error.
We are using it on Windows Service OS: Wiindows Server 2009 and Region: Riyadh, Ksa

omerobaid
 
Posts: 3
Joined: Tue Oct 15, 2019 7:35 am

Wed Oct 16, 2019 11:05 am

Hi,

Thanks for your information.
I am still investigating your issue. Did you use the same Excel file at the first time you ran the project well and when it threw an exception? And did you always run the same project under Windows Server 2009 environment?
If the answer are both yes for the first two points. Please try to test your project under other Server environment(if you have), such as Window Server 2012.
If the issue still exists after trying under other environment, please offer us a runnable project which could reproduce your issue directly. You could upload it here or send us(support@e-iceblue.com) via email.

Best wishes,
Amber
E-iceblue support team
User avatar

Amber.Gu
 
Posts: 525
Joined: Tue Jun 04, 2019 3:16 am

Return to Spire.XLS