G
Guest
I am trying to export an Excel file (4 worksheets) to a single Access table.
The code I use is the following:
DoCmd.TransferSpreadsheet acImport, , "DataImport", FileName, False,
"Sheetname1"
DoCmd.TransferSpreadsheet acImport, , "DataImport", FileName,
False, "Sheetname2"
DoCmd.TransferSpreadsheet acImport, , "DataImport", FileName,
False, "Sheetname3"
DoCmd.TransferSpreadsheet acImport, , "DataImport", FileName,
False, "Sheetname4"
My Sheetname1 and Sheetname3 have only 4 fields, Sheetname2 and Sheetname4
have 12 fields.
When I run this code I get the following error:
Field 'F5' doesn't exist in destination table 'DataImport'. Is there any
other way of exporting an Excel workbook to a single table in one shot, if
not what can I do correct the issue.
Thank you!
The code I use is the following:
DoCmd.TransferSpreadsheet acImport, , "DataImport", FileName, False,
"Sheetname1"
DoCmd.TransferSpreadsheet acImport, , "DataImport", FileName,
False, "Sheetname2"
DoCmd.TransferSpreadsheet acImport, , "DataImport", FileName,
False, "Sheetname3"
DoCmd.TransferSpreadsheet acImport, , "DataImport", FileName,
False, "Sheetname4"
My Sheetname1 and Sheetname3 have only 4 fields, Sheetname2 and Sheetname4
have 12 fields.
When I run this code I get the following error:
Field 'F5' doesn't exist in destination table 'DataImport'. Is there any
other way of exporting an Excel workbook to a single table in one shot, if
not what can I do correct the issue.
Thank you!