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 08, 2018 8:31 am

Hi!

I was generating my excel when I see a different data in my "hours" columns.
I save the hours in my database as "00:00", but excel write it like "00/00/000 00:00".
I try to force "worksheet.range[range].NumberFormat" = "@";" but it doesn't work.
Can someone help me?

sergiogm
 
Posts: 5
Joined: Wed Apr 25, 2018 11:29 am

Tue May 08, 2018 10:04 am

Hello,

Thanks for your inquiry.
What is the data type of the data “00:00” in your database, is it DateTime or "String"? Theoretically, if the data type is DateTime, Spire.XLS would parse the hour to the default DateTime format.
If you want to get the result“00:00", we suggest that you change the data type to string instead.

Sincerely,
Jane
E-iceblue support team
User avatar

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

Thu May 10, 2018 6:20 am

Hello,

Greetings from e-iceblue!
How is the issue now?
Your feedback would be greatly appreciated!

Sincerely,
Jane
E-iceblue support team
User avatar

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

Return to Spire.XLS