modifying excel tables with asp.net
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
Hi, I have an excel files "c:\test.xls I want to modify excel tables with asp.net . I am using this codes but it is not run correctly. How can i solve this problem? Thanks. Dim sConn As String Dim OleConn As OleDbConnection Dim OleCmd As OleDbCommand sConn ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\test.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()