Help! Having trouble importing data from spreadsheet!

robertlevine

Registered User.
Local time
Today, 18:06
Joined
Oct 8, 2003
Messages
24
I am having trouble importing data into Microsoft Access 97 from a Microsoft Excel 97 spreadsheet. I am getting the Run-time error '3274', "External table isn't in the expected format."


DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, "tablename", "c:\file.xls", True, "'sheetname'!A1:AY50"

If I physically go and open the file and then run the same transferspreadsheet code, the file imports flawlessly.

Can anyone help?
 
Do the fields your importing contain calculations? Also, check the field formats between the two and make sure they are the same.
 
No calculations whatsoever. This spreadsheet was created by microsoft access via the OutputTo command.

DoCmd.OutputTo acOutputQuery, "QueryName", acFormatXLS, "filepath\file.xls", True, ""


Other spreadsheets import perfectly fine... and once I open the excel spreadsheet it works fine too.
 

Users who are viewing this thread

Back
Top Bottom