Import Data and Validation (1 Viewer)

ProgramRasta

Member
Local time
Today, 10:11
Joined
Feb 27, 2020
Messages
76
Hi All,

I hope everyone is keeping well!

I am trying to import an Excel file into Access. The trick being, I only need to import certain fields.

I have a spreadsheet named 'Data.xlsx'. It has data I need in the range D:F but I only need columns D and F.

Column D in my spreadsheet contains an identifier that may contain 100 rows - I only need a subset of this data that where the identifier is equal to the identifier in my database table 'Identifier'.

I was hoping to append this data into a table called 'Data' in my database.

Many Thanks for your time.
 

Attachments

arnelgp

error reading drive A:
Local time
Today, 17:11
Joined
May 7, 2009
Messages
10,243
you create a Linked table for the excel sheet.
using query, you can extract whatever value you need.
 

namliam

The Mailman - AWF VIP
Local time
Today, 11:11
Joined
Aug 11, 2003
Messages
11,633
With docmd.transferspreadsheet you can define a range to import into a table
Import into a temp table and pick up the ID you nee with a query, shouldnt be too hard to do.
 

ProgramRasta

Member
Local time
Today, 10:11
Joined
Feb 27, 2020
Messages
76
Thanks for the replies.

The spreadsheet name will change so I would need to link in the spreadsheet each time.

I was trying to avoid using a temp table if possible (no particular reason other than just trying to see if it's possible to do it without it).

Thank you
 

Gasman

Enthusiastic Amateur
Local time
Today, 10:11
Joined
Sep 21, 2011
Messages
6,643
CJ_London shows how to query data from an Excel workbook here.

 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom