troubleshooting Question

Import excel into access using code

Avatar of needhelpfast569
needhelpfast569 asked on
Microsoft OfficeMicrosoft AccessMicrosoft Applications
3 Comments1 Solution1392 ViewsLast Modified:
Hi experts,

Have a problem that I hope you can help with. I have a access application that has to have to versions access 2003 and access 2007. I export to a excel file using the following statement

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "SurveyExportFile", ThisDir & FldVal & "SurveyExportFile.xls", True

and import a excel file using the following statement

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, "SurveyExportFileImport", pathNmeStr

Both of these statements work great in the access 2003 version using excel 2003 format.

But the same statements in access 2007 does not work for the import

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, "SurveyExportFileImport", pathNmeStr

I have tried changing the acSpreadsheetTypeExcel but no luck I get the error

Runtime error 3170  Could not find installable ISAM

Looking at several blogs I get the feeling that access 2007 does not want to import execl 2003 files.

If I get a copy of excel 2007 and use that with the access 2007 with that fix the problem, since most people would have excel 2007 if they are using access 2007.

Also if I export and import excel 2007 files in access 2007 what acSpreadsheetTypeExcel version do I use?

Thanks for any help.
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros