LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default ADO from .xls to .xlsm file - "Unrecognized database format" e

Thanks Bob, I'm still not really sure where I was going wrong - it may have
been in the format of the connection string, but when I copied yours it
worked ok and got me past this blockage.
Thanks for the help!

"Bob Phillips" wrote:

This works okay for me

cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & sFilename & ";" & _
"Extended Properties=Excel 8.0;"



--
__________________________________
HTH

Bob

"Tara H" wrote in message
...
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!




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Excel Discussion (Misc queries) 0 April 23rd 09 08:53 PM
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Setting up and Configuration of Excel 0 April 23rd 09 08:53 PM
Run Time Error 3343 - Unrecognized database format: Maury Markowitz[_2_] Excel Programming 4 May 29th 08 09:13 AM
Self-Contained "Database" file? woodman650 Excel Programming 2 June 11th 06 09:00 PM
How Can I Update the database file from "Excel" and Built the ent. Kenneth Excel Programming 0 March 11th 05 03:33 AM


All times are GMT +1. The time now is 01:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"