We are having two different issues with exporting using the Export To ExcelML.
First I'll show the code that we're using:
The first issue. In the database we have the Date column as a DateTime datatype. I have the Custom ExcelExportType set to only show "mm/dd/yyyy" When it exports it will show up with that format - but the data still has the time included with it. We need it to only export the date, not the time.
The second issue comes from trying to open the exported file. Every time we try to open the .xls file, a warning comes up
"The file that you are trying to open, 'Filename.xls' is in a different format than specified by the file extension"
Everything still worked after that - but it is a little annoying have to go through that each time.
Please let me know of any suggestions.
Thanks.
First I'll show the code that we're using:
Me
.RadGridView1.Columns(
"Date"
).ExcelExportType = DisplayFormatType.Custom
Me
.RadGridView1.Columns(
"Date"
).ExcelExportFormatString =
" mm/dd/yyyy "
Dim
exporter
As
Export.ExportToExcelML =
New
Export.ExportToExcelML(
Me
.RadGridView1)
exporter.FileExtension =
"xls"
exporter.HiddenColumnOption = HiddenOption.DoNotExport
exporter.ExportVisualSettings =
True
exporter.RunExport(fileName)
The first issue. In the database we have the Date column as a DateTime datatype. I have the Custom ExcelExportType set to only show "mm/dd/yyyy" When it exports it will show up with that format - but the data still has the time included with it. We need it to only export the date, not the time.
The second issue comes from trying to open the exported file. Every time we try to open the .xls file, a warning comes up
"The file that you are trying to open, 'Filename.xls' is in a different format than specified by the file extension"
Everything still worked after that - but it is a little annoying have to go through that each time.
Please let me know of any suggestions.
Thanks.