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

Import From Excel To Access - Non-Named Ranges 2

Status
Not open for further replies.

Russie

Programmer
Dec 24, 2000
104
US
Hi.

I have a database that, on a monthly basis, can import anything from 8000 to 40000 records from excel into access.

I can easily set up an import that deals with named ranges. My problem is how to import using non-named ranges, i.e. to get Access to somehow count the row that have data in them in Excel and to then assign the count variable and import.

I know that I could do a simple loop and travel down my excel data testing the cell contents and moving on etc..and count, but when I tried this on 40000 records it took far too long.

Is there a method or object within excel that can quickly count a cells status, i.e. whether it is populated or not?

If I could find out how to quickly check the cells in excel to find out how many rows are populated my problem would be solved.

Thanks for anything.

Russie
 
Hi Russie ,

I have an example of how to import single/multiple sheets by sheet or range name at . The file to look at is Import Multiple Excel Worksheets into Access .

If you take a look at the code behind the buttons, should point you in the right direction.

Bill
 
Hi Bill.

I've already downloaded the sample from your site. I did a search on non-named ranges and I found a question which you had answered.

It is a good example, and well worth a star.

Many Thanks.

Russie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top