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.

Wed Dec 07, 2016 6:37 pm

Hi,
I'm trying to set date in CellRange, I set for example:
range.Value = "08/09/2016"
But it automatic write in the range: "08/09/2016 12:00:00 AM", and I don't find a way to force it to write my original date?
(I don't set the NumberFormat or set the cell to be a date cell because I string another text to the cell after)
Thank you!
Sara.

sarafrank.ssf@gmail.com
 
Posts: 12
Joined: Wed Dec 09, 2015 9:32 am

Thu Dec 08, 2016 2:16 am

Dear Sara,

Thanks for your inquiry.
Please try to use following code to solve this issue.
Code: Select all
sheet.Range["A3"].Text = "08/09/2016";

If there is any question, welcome to get it back to us.

Sincerely,
Betsy
E-iceblue support team
User avatar

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

Fri Dec 09, 2016 7:15 am

Dear Sara,

Did you test the code ? Has your issue been resolved ?

Thanks,
Betsy
E-iceblue support team
User avatar

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

Tue Dec 13, 2016 10:41 am

Hi,
It was solved!!
Thank you!!!
Sara.

by the way, I didn't get any announcement that you answered, so only now I saw the message...
sorry I didn't answer before!

sarafrank.ssf@gmail.com
 
Posts: 12
Joined: Wed Dec 09, 2015 9:32 am

Wed Dec 14, 2016 1:21 am

Dear Sara,

Thanks for your feedback.
Welcome to write to us for further question. We are here for help.

Sincerely,
Betsy
E-iceblue support team
User avatar

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

Return to Spire.XLS