Open xlsx with Excel 2003 (Compatibility Pack)

C

Chris N

Hi Everybody,

I'm trying to open an Excel 2007 .xlsx file on a machine that has Office
2003 (SP3) installed along with the Office 2007 Compatibility pack.

If I try the Excel 12 style ADO connection string below, it just errors
indicating that the provider can't be found - which is fair enough.

"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Test.xlsx;Extended
Properties=Excel 12.0"

If I equally try the Excel 8 style ADO connection string below, it throw a
different error indicating that the "External table is not in the expected
format."

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Test.xlsx;Extended
Properties=Excel 8.0"

Does anyone know if there is an alternative connection string or any
additional parameters I need to allow this to be opened.

(BTw: The Excel 12 ADO connection string works fine when Office 2007 is
installed)

Thanks in advance,

Chris
 
S

Steve Rindsberg

Try:

Open the .XLSX file,
Save to a temp .XLS file
Then extract data from that.
 
C

Chris N

Hi Steve,

Thanks for the reply. Unfortunately I would rather avoid having to do
something like this if possible - I was hoping that there would just be an
extra parameter or something that could be put onto the connection string.

But if that's the only option, I might have to go with it.

Thanks again,

Chris
 
S

Steve Rindsberg

Chris N said:
Hi Steve,

Thanks for the reply. Unfortunately I would rather avoid having to do
something like this if possible - I was hoping that there would just be an
extra parameter or something that could be put onto the connection string.

But if that's the only option, I might have to go with it.

I think it may be; the compat pack is basically the code from 2007 that
backsaves to 97-2003 format and probably only gets triggered when you open an
Office 2007 file.

I'm guessing that the compat pack does nothing for the database drivers
you're working with.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top