T
Tara H
I'm trying to use ADO to pull data from a .xls file into a .xlsm file in
Excel 2007. Whatever I do gives me the error:
Run-time error '-2147467259 (80004005)':
Unrecognized database format
I've searched for this and found some results relating to corrupted files,
but I doubt this can be the case - I've tried it with a number of different
input files and even created one by hand from scratch to test with.
I've tried many different samples of code that I've found on this forum, and
each of them gives the same error at the 'cn.open' point. The connection
string I'm currently using is:
cn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data
Source=C:\temp\testbook.xls;"
I'm not entirely sure if I'm using the right driver and references, since I
haven't been able to find an example of my exact situation.
Any guidance would be very gratefully received - I've been tearing my hair
out over this and making no progress!
Excel 2007. Whatever I do gives me the error:
Run-time error '-2147467259 (80004005)':
Unrecognized database format
I've searched for this and found some results relating to corrupted files,
but I doubt this can be the case - I've tried it with a number of different
input files and even created one by hand from scratch to test with.
I've tried many different samples of code that I've found on this forum, and
each of them gives the same error at the 'cn.open' point. The connection
string I'm currently using is:
cn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data
Source=C:\temp\testbook.xls;"
I'm not entirely sure if I'm using the right driver and references, since I
haven't been able to find an example of my exact situation.
Any guidance would be very gratefully received - I've been tearing my hair
out over this and making no progress!