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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Querying an Excel Sheet to Import Data

Status
Not open for further replies.

kained

Programmer
Mar 3, 2010
1
EU
Hi there,

Ive trolled the Internet to find a solution to Importing Excel data into access, but no solution seems suitable.

I understand you can use transfer spreadsheet etc but am curious about the little documented method described below.

where fsp is my excel file...
Code:
CurrentDb.Execute ("INSERT INTO [ActiveD] SELECT [Company Code], [Business System], [Country], [Channel], [Global Id] FROM [ActiveD$] IN '' [Excel 8.0;DATABASE=" & fsp & "]; ")

I receive the following error, which is probably a red herring but leaves me scratching my head.

"Circular reference caused by alias 'Company Code' in queries definition's SELECT list."

It may be my naivety, but the statement doesn't use Alias.

Has anyone used this method successfully? And can anyone throw any light on the problem?

Many thanks for reading.

Regards,
David
 
Why not simply use a linked table ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top