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
  1. Home
  2. General Programming
  3. C#
  4. Why just get NULL return from excel oledb

Why just get NULL return from excel oledb

Scheduled Pinned Locked Moved C#
comhelpquestion
2 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.
  • R Offline
    R Offline
    remex_1980_junyongwu
    wrote on last edited by
    #1

    Hi everyone, I use the OLE connection to read data from excel file; OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + strFileName + "; Jet OLEDB:Engine Type=5;" + "Extended Properties=\"Excel 8.0;\""); OleDbDataAdapter SheetAdapter = new OleDbDataAdapter("select * from [" + strSheetName + "]", conn); But when using the method to read the excel data like this: 111111111 2222(ds)/1232(jjj) It just return NULL to the dataset row. I really don't know why ? Can you help me please? Thanks in advance.

    R 1 Reply Last reply
    0
    • R remex_1980_junyongwu

      Hi everyone, I use the OLE connection to read data from excel file; OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + strFileName + "; Jet OLEDB:Engine Type=5;" + "Extended Properties=\"Excel 8.0;\""); OleDbDataAdapter SheetAdapter = new OleDbDataAdapter("select * from [" + strSheetName + "]", conn); But when using the method to read the excel data like this: 111111111 2222(ds)/1232(jjj) It just return NULL to the dataset row. I really don't know why ? Can you help me please? Thanks in advance.

      R Offline
      R Offline
      remex_1980_junyongwu
      wrote on last edited by
      #2

      Clearify question: the 11111111 is returned well, but can't get the next row - 2222(ds)/1232(jjj):(

      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