G
Gabriel Carulias
Hi all
I have an Excel file and I am reading data from the ActiveWorkbook. I am
using the below code to create a ADODB connection.
Dim dt As New ADODB.Connection
With dt
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source=" & ThisWorkbook.Path & "\" &
ThisWorkbook.Name
.Properties("Extended Properties") = "Excel 8.0;HDR=Yes"
.Open
End With
The issue is that if I open firstly a blank Excel file, and then I open my
Excel file (with the above code) , when executing the “.Open†instruction,
Excel opens a new instance of my Excel file. This issue decreases the
performance of the Excel application, and provoke bad results.
How can i fix this issue? I am using an ADODB connection because I need to
run a query against Excel and then save data to a local DB.
Thank.
I have an Excel file and I am reading data from the ActiveWorkbook. I am
using the below code to create a ADODB connection.
Dim dt As New ADODB.Connection
With dt
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source=" & ThisWorkbook.Path & "\" &
ThisWorkbook.Name
.Properties("Extended Properties") = "Excel 8.0;HDR=Yes"
.Open
End With
The issue is that if I open firstly a blank Excel file, and then I open my
Excel file (with the above code) , when executing the “.Open†instruction,
Excel opens a new instance of my Excel file. This issue decreases the
performance of the Excel application, and provoke bad results.
How can i fix this issue? I am using an ADODB connection because I need to
run a query against Excel and then save data to a local DB.
Thank.