Spire.XLS for .NET is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application, both ASP.NET web sites and Windows Forms application.

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