Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Page_Load(ByVal sender As System.Object, ByVal e A
System.EventArgs) Handles MyBase.Load Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Dat Source='C:\Timmy\Demographic Application\CENTRAL.XLS';Extende Properties=""Excel 8.0;HDR=NO""" Dim conn As New OleDbConnection(strConn) Dim strSQL As String = "UPDATE [General$A86:A86] SET F1 2000" Dim cmd As New OleDbCommand(strSQL) cmd.Connection = conn conn.Open() Dim rows As Integer = cmd.ExecuteNonQuery() cmd.Connection.Close() conn.Close() conn = Nothing End Sub Hi! I found the following code (or very similar) in an example. I want t write to the A86 cell of the General sheet in the workbook mentione in the connection string. However, the problem is that after I run th asp.net test example above, and then try to open the spreadsheet, Exce says that there is a "memory write problem" and also that it is locke for editing. I cannot even delete the spreadsheet because Windows say there is a sharing violation. I do not know what is really wrong wit the above code as I practically copied it from the MSDN website. would greatly appreciate any help! Thanks! Timoth -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Writing Macro in Excel 07 | Excel Worksheet Functions | |||
need help writing a formula in excel | New Users to Excel | |||
Writing Tool for Excel | Excel Discussion (Misc queries) | |||
Writing macro in Excel | Excel Worksheet Functions | |||
Help writing an Excel Formula | Excel Worksheet Functions |