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 May 28, 2013 6:28 pm

I have the following line of code:

sheet.Range[1,1].DateTimeValue = MyDate;

but MyDate is (DateTime?) nulluable

Can I use the DateTimeValue with null dates? (show them as blanks)

veljean
 
Posts: 11
Joined: Tue May 28, 2013 6:22 pm

Wed May 29, 2013 6:07 am

Hello,

Thanks for your inquiry.

You could use Value2, please refer to the code as below,
Code: Select all
sheet.Range[1,1].Value2= MyDate;


If there are any questions, welcome to get it back to us.

Sincerely,
Gary
E-iceblu support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Wed May 29, 2013 3:34 pm

Thanks Gary!

veljean
 
Posts: 11
Joined: Tue May 28, 2013 6:22 pm

Return to Spire.XLS