Import Data and Validation (1 Viewer)

ProgramRasta

Member
Local time
Today, 08:18
Joined
Feb 27, 2020
Messages
98
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

  • Import.accdb
    688 KB · Views: 91

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:18
Joined
May 7, 2009
Messages
19,169
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, 09:18
Joined
Aug 11, 2003
Messages
11,696
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, 08:18
Joined
Feb 27, 2020
Messages
98
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, 08:18
Joined
Sep 21, 2011
Messages
14,037
CJ_London shows how to query data from an Excel workbook here.

 

Users who are viewing this thread

Top Bottom