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. Web Development
  3. ASP.NET
  4. OLEDB and EXCEL Worksheet Problem

OLEDB and EXCEL Worksheet Problem

Scheduled Pinned Locked Moved ASP.NET
databasecomhelp
3 Posts 3 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.
  • M Offline
    M Offline
    mithun narayanan
    wrote on last edited by
    #1

    string constr = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + Serverpath + "\\" + Session.SessionID + "1" + "." + fileext + ";Extended Properties=\"Excel 8.0;HDR=NO;IMEX=1\""; OleDbConnection con = new OleDbConnection(constr); con.Open(); OleDbCommand com = new OleDbCommand("SELECT * FROM [Sheetname$]", con); In the query sheetname is worksheet name. my sheet name will change frequently. is ther any way to access sheet name using sheet INDEX its very urgent ...... Thnaks in advance....

    D A 2 Replies Last reply
    0
    • M mithun narayanan

      string constr = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + Serverpath + "\\" + Session.SessionID + "1" + "." + fileext + ";Extended Properties=\"Excel 8.0;HDR=NO;IMEX=1\""; OleDbConnection con = new OleDbConnection(constr); con.Open(); OleDbCommand com = new OleDbCommand("SELECT * FROM [Sheetname$]", con); In the query sheetname is worksheet name. my sheet name will change frequently. is ther any way to access sheet name using sheet INDEX its very urgent ...... Thnaks in advance....

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      mithun narayanan wrote:

      its very urgent

      Avoid using "urgent". This[^] article might help you.

      Loading signature. Please wait...

      1 Reply Last reply
      0
      • M mithun narayanan

        string constr = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + Serverpath + "\\" + Session.SessionID + "1" + "." + fileext + ";Extended Properties=\"Excel 8.0;HDR=NO;IMEX=1\""; OleDbConnection con = new OleDbConnection(constr); con.Open(); OleDbCommand com = new OleDbCommand("SELECT * FROM [Sheetname$]", con); In the query sheetname is worksheet name. my sheet name will change frequently. is ther any way to access sheet name using sheet INDEX its very urgent ...... Thnaks in advance....

        A Offline
        A Offline
        Ashfield
        wrote on last edited by
        #3

        mithun narayanan wrote:

        its very urgent ......

        Isn't it always - but only to you, nobody else cares. In the time it took you to post the question you could have tried it for yourself, so why don't you just go into debug and try it?

        Bob Ashfield Consultants Ltd

        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