Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I specify what columns to import from Excel to Access?

Status
Not open for further replies.

src23

Programmer
Jul 10, 2003
22
RO
Hi !

I'm trying to import an excel spreadsheet into an access table, but I want to import only columns B, C, E to H , M, O and R.

I tried to import all the sheet at once into a temporary table, then run a sql and select into my table only the columns that i'm interested - it's working OK.

But I know there must be a way to specify the range to import (which columns) - but I just can't figure it out what syntax I should use.

I'm talking about the Range argument of the DoCmd.TransferSpreadsheet, i don't know how to specify only those columns to be imported.

If you could show me the syntax, or show me a link where I could find more information about the syntax, you will help me a lot.


Thanx in advance.



 
I don't believe the TransferSpreadsheet Range argument will allow you to slice up a range. It's best to do the temp table as you are doing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top