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. ASP.NET
  4. Need help to update excel file using oledb

Need help to update excel file using oledb

Scheduled Pinned Locked Moved ASP.NET
helptutorialannouncement
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
    RaghuSanta
    wrote on last edited by
    #1

    Hi All, How to update a cell value in a excel sheet. Ex. Need to update A1 value in excelworksheet using oledb. When tried to update I am getting error like "No value given for one or more required parameters." Raghu

    R 1 Reply Last reply
    0
    • R RaghuSanta

      Hi All, How to update a cell value in a excel sheet. Ex. Need to update A1 value in excelworksheet using oledb. When tried to update I am getting error like "No value given for one or more required parameters." Raghu

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

      Hi, I just found the solution. May be this could help others. Dim sConn As String Dim OleConn As OleDbConnection Dim OleCmd As OleDbCommand sConn ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\testexcel.xls;Extended Properties=""Excel 8.0;HDR=No;""" OleConn = New OleDbConnection(strConn) OleConn.Open() OleCmd = OleConn.CreateCommand() Olecmd.commandtext="UPDATE [sheet1$F1:A1] SET F1 ='6'" OleCmd.ExecuteNonQuery() OleCmd = Nothing OleConn.Close() On giving the above statement, the cell A1(first row first column) gets updated with value in the excel. Regards, Raghu.

      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