Hi,
I m using Infragistics3 Excel ver9, trying to load a workbook/worksheet into a datatable. I found out that a cell that has cell format as custom Date, after loading into the Infragistics cell, it displayed as Double and the value is disorted. I also tried to change the Infragistics cell format to empty or General, but the value still is distorted as double.
How can i get the exact value as stored in MS Excel which has custom format ?
In the Excel format, dates are stored internally in workbooks as numbers. So when a workbook is loaded, that's how the value will appear on the cell. If you know a cell is supposed to be a date, you can convert the value with a static method on Infragistics.Excel.CalcEngine.ExcelCalcValue called ExcelDateToDateTime.
thanks, but the problem is I will not know which cell is gonna be a date, it can be dynamic depends on the excel file is loaded. What else can I do to overcome this ambiguous cell type?
thanks