Joe Boyd
asked on
Import partial Excel spreadsheet into Access empty table
I have a table in access with 15 fields. The table is empt I- no data yet. I have a spreadsheet that has 22 columns, 10 of the columns match 10 of the 15 columns in the Access table exactly. I want to import just the data from just the 10 columns of the spreadsheet. What is the best way to do this and how. Can I just import it directly into the Access table or do I have let the import create a new table and then append this new table to the other table where I really want the data. I guess what I'm saying is what is the best way to handle importing a spreadsheet table where only part of the spreadsheet matches part of the table exactly.
Thank you,
Joe B.
Thank you,
Joe B.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I would go to excel and create a named range then import the named range. Here is how you do it:
Open excel and select all the cells, row, columns, etc that you wish to import.
Go to Insert, Name, Define.
Open excel and select all the cells, row, columns, etc that you wish to import.
Go to Insert, Name, Define.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Forced accept.
Computer101
EE Admin
Computer101
EE Admin
you can use
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, _
"TestTable", "C:\T.XLS", True, "Sheet1!A:J"