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.

Mon Nov 13, 2017 8:54 pm

Hello,
I have a ops column where some of the values in datatable like 10,15 or 03,10,15. Now when it's displaying this using Free spire.xls the column looks like 10/15/2017 or 3/10/2015

Datable Excel
10,15 10/15/2017 not ok. how it's converting to date
03,10,15 3/10/2015 not ok. how it's converting to date
09 9 This is ok. But needs to be 09 though

I don't have any date format or anything.
code is simple . I have sheet.InsertDataTable(dt, true, 3, 1);
then savetoFile. Need help. this is strange.

mguha
 
Posts: 11
Joined: Thu Nov 09, 2017 8:54 pm

Tue Nov 14, 2017 3:25 am

Hello,

Thanks for your post. Please change sheet.InsertDataTable(dt, true, 3, 1) into sheet.InsertDataTable(dt, true, 3, 1, true) which will keep the format from the data table.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Wed Nov 15, 2017 9:03 am

Hello,

Hope you are doing well.
Did you try the solution I provided? Is it working on your side?
Please give us some feedback at your convenience.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Wed Nov 15, 2017 2:49 pm

Solved. Thanks

mguha
 
Posts: 11
Joined: Thu Nov 09, 2017 8:54 pm

Thu Nov 16, 2017 3:32 am

Hello,

Thanks for your feedback. If you have any other question, please feel free to contact us.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Return to Spire.XLS