Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
670
Excel workbook load incorrect cell data value
posted

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 ?

Parents
No Data
Reply
  • 44743
    posted

    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.

Children