R
Rob T
I have a routine that imports a spreadsheet which normally works fine.
However, sometimes I can find excel.exe is still running as a process in the
task manager and I manually need to end it. If I don't kill it, I'm unable
to open other spread sheets through the regular excel app.
Attached is my code....is there something else I should do to insure the
process ends? Thanks.
strExcel = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & boxFile.Text &
";Extended Properties=""Excel 8.0;IMEX=1;HDR=NO"""
Try
cnnExcel = New OleDbConnection(strExcel)
da = New OleDbDataAdapter("Select * from [ODRJYUFI$]", cnnExcel)
ds = New DataSet
da.Fill(ds, "Excel")
cnnExcel.Close()
dv = New DataView(ds.Tables("Excel"))
Catch ex As Exception
Exit Sub
End Try
However, sometimes I can find excel.exe is still running as a process in the
task manager and I manually need to end it. If I don't kill it, I'm unable
to open other spread sheets through the regular excel app.
Attached is my code....is there something else I should do to insure the
process ends? Thanks.
strExcel = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & boxFile.Text &
";Extended Properties=""Excel 8.0;IMEX=1;HDR=NO"""
Try
cnnExcel = New OleDbConnection(strExcel)
da = New OleDbDataAdapter("Select * from [ODRJYUFI$]", cnnExcel)
ds = New DataSet
da.Fill(ds, "Excel")
cnnExcel.Close()
dv = New DataView(ds.Tables("Excel"))
Catch ex As Exception
Exit Sub
End Try