TransferSpreadSheet

L

laks

We are exporting a .mdb file to excel using the TransferSpreadSheet
method. This worked fine upto Office 2003. Now we have upgraded our
office version to 2007. Trying to export the .mdb file to excel as a
xlsx file does not work properly. Everything seems to be smooth except
that when we open the xlsx file, we recieve an error telling the file
format or file extension is not correct.

When I rename the file with .xls as the file extension, I can open it
without any problem. I can also export the .mdb file as .xls without
any issue.

Can anyone help me with this.

Thanks!
 
D

Douglas J. Steele

I don't know for certain, but it's probably related to the security
"feature" that limited what extensions you can use for text files for some
time.

Easiest fix would be to export to .xls, and then rename the file (using the
VBA Name statement)

If that doesn't satisfy you, there's probably a registry key that can be
tweaked, but unfortunately I don't have Access 2007 installed on this
machine so I can't look for it. (for older versions of Access, it would have
been under HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\4.0\Engines)
 
L

laks

I don't know for certain, but it's probably related to the security
"feature" that limited what extensions you can use for text files for some
time.

Easiest fix would be to export to .xls, and then rename the file (using the
VBA Name statement)

If that doesn't satisfy you, there's probably a registry key that can be
tweaked, but unfortunately I don't have Access 2007 installed on this
machine so I can't look for it. (for older versions of Access, it would have
been under HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\4.0\Engines)

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no private e-mails, please)









- Show quoted text -

Hi Douglas,

I tried your first sloution, export as .xls and then rename it
as .xlsx. When I open I recieve the same error "Cannot open the file
since the file format or file extension is not valid.
I also tried changing the DisabledExtension registry entry to !
xls,xlsx. This too did not solve the problem.

Thanks much!
Laks.
 
D

Douglas J. Steele

laks said:
Hi Douglas,

I tried your first sloution, export as .xls and then rename it
as .xlsx. When I open I recieve the same error "Cannot open the file
since the file format or file extension is not valid.
I also tried changing the DisabledExtension registry entry to !
xls,xlsx. This too did not solve the problem.

Why not rename it back to .xls before opening (and back when you're done)?
 

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