By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,417 Members | 1,178 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,417 IT Pros & Developers. It's quick & easy.

Excel process remaining

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I suspect you have code somewhere that causes the problem, not the code you
showed here. In the code you posted, there is nothing involve Exece.exe, the
Excel application. The data is read by Jet engine, which does not start
Exce.exe.

"Rob T" <RT*********@DONTwalchemSPAM.com> wrote in message
news:OL**************@TK2MSFTNGP10.phx.gbl...
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

Nov 21 '05 #2

P: n/a
There are bugs in this provider that can cause worksheets to double in size
unpredictably and without apparent cause. There is a KB article about this,
which you could probably find without much trouble. With that sort of
bugginess, I wouldn;t be trying to use ADO. Automate Excel instead (assuming
you are not running your code unattended on a server without a login).

"Norman Yuan" wrote:
I suspect you have code somewhere that causes the problem, not the code you
showed here. In the code you posted, there is nothing involve Exece.exe, the
Excel application. The data is read by Jet engine, which does not start
Exce.exe.

"Rob T" <RT*********@DONTwalchemSPAM.com> wrote in message
news:OL**************@TK2MSFTNGP10.phx.gbl...
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


Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.