Buck Beasom
asked on
Import Excel Using Saved Import
I'm trying to import an Excel file into a Table in my application using
DoCmd.TransferSpreadsheet , , "Ledger_Import", strFileName
It is giving me an error that says "F1 is not in Ledger_Import" but there is no F1 column heading in the Excel sheet. Can I use a saved import specification to identify which columns are text and which are numbers and to make the upload go smoothly? Any other suggestions welcomed.
Thanks.
DoCmd.TransferSpreadsheet , , "Ledger_Import", strFileName
It is giving me an error that says "F1 is not in Ledger_Import" but there is no F1 column heading in the Excel sheet. Can I use a saved import specification to identify which columns are text and which are numbers and to make the upload go smoothly? Any other suggestions welcomed.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
As usual, Capricorn1 gets me right out of the woods on the first try!
"F1" means "Field1", ...a generic name for the field if you forget to use the HasFieldNames argument of the TransferSpreadheet Action...
...or if the data has no field names.
So capricorn1's syntax will work just fine for you.
See the VBA Help Files for the TransferSpreadsheet Action/Method, ...for more detailed information.