I have some VBA code that queries a sheet in a excel 2007 workbook using ADO. I use a connection string like this:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myExcel2007file.xlsm;Extended Properties="Excel 12.0 Macro;HDR=YES";
While my code does work, I'm finding that it is a bit slow. My hunch is that when the connection is being made, it is re opening my file. Is there any way I can, instead of giving the full path to my datasource, indicate that the data source is the current work book? Thanks.
- Matt
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myExcel2007file.xlsm;Extended Properties="Excel 12.0 Macro;HDR=YES";
While my code does work, I'm finding that it is a bit slow. My hunch is that when the connection is being made, it is re opening my file. Is there any way I can, instead of giving the full path to my datasource, indicate that the data source is the current work book? Thanks.
- Matt