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
355
row.GetCellValue and Date value in excel column
posted

Hi, when I use

row.GetCellValue(column.Index).ToString()

I get number value but in excel column I have date value :(.

In excel file the cell format is date and I see value in date format (dd.mm.yyyy).

In my case in the excel sheet I have value 21.2.2002 (dd.mm.yyyy) and row.GetCellValue(column.Index).ToString() returns value 37308.

Could you advise how to get correct date value?

Thank you
Libor


Parents
No Data
Reply
  • 355
    Offline posted

    I tried to find cell format out.

    And here is my list of CellFormat properties. No information regarding date format :(

    ?column.CellFormat
    {Infragistics.Documents.Excel.WorksheetColumnOwnedFormatProxy}
        [Infragistics.Documents.Excel.WorksheetColumnOwnedFormatProxy]: {Infragistics.Documents.Excel.WorksheetColumnOwnedFormatProxy}
        Alignment: Default
        BottomBorderColor: "{Name=0, ARGB=(0, 0, 0, 0)}"
        BottomBorderColorInfo: null
        BottomBorderStyle: Default
        DiagonalBorderColor: "{Name=0, ARGB=(0, 0, 0, 0)}"
        DiagonalBorderColorInfo: null
        DiagonalBorders: Default
        DiagonalBorderStyle: Default
        Fill: null
        FillPattern: Default
        FillPatternBackgroundColor: "{Name=0, ARGB=(0, 0, 0, 0)}"
        FillPatternForegroundColor: "{Name=0, ARGB=(0, 0, 0, 0)}"
        Font: {Infragistics.Documents.Excel.WorkbookFontOwnerAccessor}
        FormatOptions: None
        FormatString: null
        Indent: -1
        LeftBorderColor: "{Name=0, ARGB=(0, 0, 0, 0)}"
        LeftBorderColorInfo: null
        LeftBorderStyle: Default
        Locked: Default
        RightBorderColor: "{Name=0, ARGB=(0, 0, 0, 0)}"
        RightBorderColorInfo: null
        RightBorderStyle: Default
        Rotation: -1
        ShrinkToFit: Default
        Style: Built in style: Normal
        TopBorderColor: "{Name=0, ARGB=(0, 0, 0, 0)}"
        TopBorderColorInfo: null
        TopBorderStyle: Default
        VerticalAlignment: Default
        WrapText: Default

Children