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