C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Exporting data in TimeSpan format

rated by 0 users
This post has 1 Reply | 2 Followers

Not Ranked
Posts 2
windCollector Posted: Tue, May 26 2009 5:51 AM

Hi all,

I have a DataTable which has  data type timespan, when I export this value to excel it is exported as string

I use the following style

  styTimespan.Format = XLStyle.FormatDotNetToXL("hh:mm:ss", Type.GetType("System.TimeSpan"));

Thanks all for any help

 

regards

 

 

Top 25 Contributor
Posts 372

 Hello,

For the formatting to take place, the value being exported cannot be a string.  Try exporting the value as a Timespan rather than a string.  I hope this helps.

-Raleigh

Page 1 of 1 (2 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.