How can I update an existing excel file? I want to change certain values already present in the excel file and I am using
It gives me the error saying that there is a requirement of one or more parameters. What should I do? Please help.
Code:
Dim excelConnectionString As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Test.xlsx;Extended Properties=""Excel 12.0 Xml;HRD=No"""
Dim excelConnection As New OleDbConnection(excelConnectionString)
excelConnection.Open()
Dim strsql As String = = "UPDATE [Sheet1$A3:A3] SET F1 = 'Test'"
Dim cmd1 As New OleDbCommand(strsql, excelConnection)
cmd1.ExecuteNonQuery()
excelConnection.Close()
Comment