We help IT Professionals succeed at work.
Get Started

Query to import a selected Excel file into Access

Last Modified: 2019-11-24
I have an Access database with a table to be used for importing a periodic report from Excel. The table has 5 fields.

The format of the Excel import file will always be the same; that being the field names start on row 10 and there are 4 data fields. However,
the number of data rows will vary from one file to the next. Sometimes a file may have 100 records, another time it may have 150, etc, etc.

I want to skip over the first 10 rows (because I only want to import data contained in the 4 data fields) and terminate the import when
the row with "TOTAL" is reached. Or, in other words exclude the row with "TOTAL" in it was well as the first 10 rows.

In the Excel file, the month the report applies to always appears in cell C4. I would like to copy that value into Field5 of the Access table
for every single record.

Because this will be a recurring function, ideally what I'd like to be able to do from Access is click on a query name or a button on a form
and have it open windows explorer where I can navigate to and select the file I want.

Upon doing so, it would run an import automatically that includes and excludes the data as described above,

I have attached a sample Access database with expected results in its table as well as a sample Excel import file.

Thank you.
Watch Question
Chief Technology Officer
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE