parsing excel integer column but get double datatype in c# using oledb

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jayashreep
    New Member
    • Jan 2016
    • 1

    parsing excel integer column but get double datatype in c# using oledb

    Hi,
    I am doing parsing an excel file but when i parsed the integer column it shows System.Double as Column Data type.
    Please help me to get out of this.

    I tried in excel to make customized column Data type, but still i get the double value.
  • Luuk
    Recognized Expert Top Contributor
    • Mar 2012
    • 1043

    #2
    Code:
    checked
    {
        try
        {
            int bar = (int)foo;
        }
        catch (OverflowException)
        {
         ...          
        }
    }
    see: http://stackoverflow.com/questions/3...-double-to-int

    Comment

    Working...