We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Exporting GridControl to Excel

I am exporting grid control to excel. The export works well except for column with datatype DateTime where it displays T. I will appreciate the help.

Thanks,
Sachin

3 Replies

AD Administrator Syncfusion Team November 6, 2006 09:44 AM UTC

Hi Sachin,

If you set the GridStyleInfo.StyleInfo.Format property for your DateTime column, then the export should work ok. Here is the sample we ship created to show this idea.

http://www.syncfusion.com/Support/user/uploads/GDBGExport_2b9d6b4f.zip

Let us know if this is not what you wanted.

Regards,
Haneef


AD Administrator Syncfusion Team November 6, 2006 09:46 PM UTC

Hi Haneef,

Export works well if only Date is exported but if Time is exported It dont work. Also always time portion of date gets truncated & if manually changed using format cell in excel it shows the truncated time & also the time. I think the problem is with cell formatting & the format is always set to date instead of Date & Time.


AD Administrator Syncfusion Team November 7, 2006 09:11 AM UTC

Hi Sachin,

Please refer to the following sample which demonstrates the excel export in a grid without date/time format issues. Is it possible for you to modify the sample to reproduce the issue here?

Here is a sample
http://www.syncfusion.com/Support/user/uploads/GDBGExport_fecc01cd.zip

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon