We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Time part not included in Datetime values in Worksheet.Cells.ExportDataTable method

Hi Team,
Facing the following issue and would appreciate for a quick help.

We have a column in excel with format of Date say column MDate. If the value of cell in MDate column is blank for the first row of Range, then it truncates the values in consecutive rows at the first “space” character.

For Eg. if value in second row is like “1/20/2017 4:44:34 AM” then in the data table which is exported, it has value “1/20/2017”.

But if the value of MDate cell has a date value in the first row then data is exported properly.

I tried to use the ExportTableOptions which is one of the parameters in the overloaded methods but it did not help.

Please provide a resolution to this else we will need to read values cell by cell , which we really don’t wish to do.

Hi,


Thanks for your posting and using Aspose.Cells.

Please provide us your sample excel file. It should have two worksheets with both types of data as you have said, one should have blank value, other should have MDate. Please share your sample code, so that we could execute it at our end and find the problem. You should also download and try the latest version and see if it makes any difference in resolving this issue. Let us know your feedback

Latest Version Links:
Aspose.Cells for .NET v17.1.4 (.NET 2.0) compiled in .NET Framework 2.0.
Aspose.Cells for .NET v17.1.4 (.NET 4.0) compiled in .NET Framework 4.0.