Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. Reading an excel file using ASP

Reading an excel file using ASP

Scheduled Pinned Locked Moved Web Development
helpsysadmin
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    acerunner316
    wrote on last edited by
    #1

    dim xlsConn, xlsRS set xlsConn = Server.CreateObject("ADODB.connection") xlsConn.Open "Driver={Microsoft Excel Driver (*.xls)}; DBQ=" & uploadsDirVar & "\" & fileName set xlsRS = Server.CreateObject("ADODB.recordset") xlsRS.open "SELECT SerNumber,IO2,ICO,IH2,I1,I2,KA,R FROM AddCalData", xlsConn xlsarr = xlsRS.GetRows() The problem is that the excel file has some fields that are optional. If the some of the fields in the first data line are empty, then the remaining data in that column is lost. All data are numbers. I think it has something to do with formatting. Maybe the drivers need data in the first column to determine datatype. I found somewhere that putting IMEX=1 in the connection string will make it not restrict datatype. I did not work. If the first column has all fields filled in, then the remaining data is fine. Please help. Thanks in advance!

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups