locked
Excel Import Problem... Please help RRS feed

  • Question

  • User-1625823911 posted

    Hi... Experts,

    I am having a problem while importing data from Excel to Oracle.

    My Excel connection string is as follows

    xConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
                                   "Data Source=" & Server.MapPath("~/Uploads/New_" + Now.Date.ToString("MM_yyyy") + ".xls") & ";" & _
                                   "Extended Properties=""Excel 8.0; IMEX=1;"""

     

    The data in Excel is as follows.

     

    2087763
    2087763
    2087763
    2088262
    2088262
    2088262
    2088262
    201131642736.C3O
    201131642736.C3O
    201131642736.C3O
    201131642736.C3O
    201131642736.C4O
    201131642736.C5O
    201142065047.C1O
    20113835053.C1O
    20113835053.C1O
    20113835053.C1O
    20113835053.C1O
    20113835053.C1O
    

    The problem is that while reading the records and filling the dataset, the values with '.C10' or '.C20' or '.C30' etc is coming as null in dataset.

    Please help me in solving this issue. Its urgent.

    Thanks & Best Regards

    Sunday, May 22, 2011 2:34 AM

All replies

  • User-1625823911 posted

    The problem is that while reading the records and filling the dataset, the values with '.C10' or '.C20' or '.C30' etc is coming as null in dataset.

    Please help me in solving this issue. Its urgent

    Any suggestions???

    Sunday, May 22, 2011 6:56 AM
  • User-1625823911 posted

    Hi Experts,

    Help needed urgently...

    Sunday, May 22, 2011 9:00 AM
  • User-1625823911 posted

    HI....

    Any luck guys???????

    Monday, May 23, 2011 12:03 AM
  • User1508394307 posted

    Read more here regarding IMEX=1.

    I would suggest to use for import, for exampe, NPOI library. You would need write more code (see examples on codeplex, or google), but this would help to avoid stupid problems with a driver.

    Wednesday, June 1, 2011 3:52 PM
  • User-1625823911 posted

    I have used IMEX=1 in the connection string . if you see the first post of mine with the problem.

    Wednesday, August 10, 2011 4:30 AM
  • User1508394307 posted

    The link says "The ISAM driver by default looks at the first eight rows and from that sampling determines the datatype. If this eight row sampling is all numeric, then setting IMEX=1 will not convert the default datatype to Text; it will remain numeric."

    Wednesday, August 10, 2011 4:49 AM