PMFJI,
If it's a question of importing selected, non-contiguous columns from a
contiguous rectangular range, you can either
1) link or import the entire range to a temporary table, and use an
append query to select the data from the desired columns and insert it
into the table where you need it.
2) use an append query that links directly to the contiguous range with
syntax like these examples:
INSERT INTO MyExistingTable
SELECT Field1, Field3, Field5
FROM [Excel 8.0;HDR=Yes;database=C:\Book.xls;].[RangeName]
;
INSERT INTO MyExistingTable
SELECT F1 As Field1, F3 AS NextField, F5 AS OtherField
FROM [Excel 8.0;HDR=No;database=C:\Book.xls;].[Sheet1$A1:E100]
;
Van T. Dinh,
No. The ranges aren't contiguous. Does that mean I need to use another
method such as an append query? Would that work? If so, how would I write
the syntax? I've never done anything that advanced before. Could you walk
me thru that?
:
Are your Excel ranges contiguous?
IIRC, Access can only recognise contiguous ranges from Excel ...
--
HTH
Van T. Dinh
MVP (Access)
I have set up named ranges in Excel which correspond to tables in Access
and
used the file/get external data/import feature in Access. When I select
the
named ranges option my ranges don't appear in the selection box. What am
I
doing wrong and/or is there another way to import the data from excel to
access?