Spire.DataExport for .NET is a 100% pure data .NET library suit for exporting data into MS Word, Excel, RTF, Access, PDF, XPS, HTML, XML, Text, CSV, DBF, SYLK, SQL Script, DIF, Clipboard, etc.
Fri Oct 24, 2008 10:53 am
Hello,
I'm doing an export to excel but my date is not displayed as a date.
the correct date is in there but as a number. If i change the properties of the field, i will get the correct date. How can i fix this?
[code]
Spire.DataExport.XLS.CellExport exp = new Spire.DataExport.XLS.CellExport();
exp.DataFormats.CultureName = "nl-NL";
exp.DataFormats.Float = "#,###,##0.00";
[b]exp.DataFormats.DateTime = "dd-MM-yyyy";[/b]
exp.DataFormats.Currency = "
Last edited by
santoz on Mon Dec 08, 2008 10:12 am, edited 1 time in total.
-
santoz
-
- Posts: 8
- Joined: Wed Sep 10, 2008 8:22 am
- Location: Netherlands
-
Thu Nov 06, 2008 7:39 am
Hello,
You need to add getParams event to CellExport component,
Try to using following source code,
- Code: Select all
private void cellExport1_GetDataParams(object sender, Spire.DataExport.EventArgs.DataParamsEventArgs e)
{
if (e.Col == 1)
{
e.FormatText = "YYYY-MM-DD";
}
}
-
DataExport
-
- Posts: 35
- Joined: Thu Jun 29, 2006 2:29 pm