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!

Transfer Data from Excel to Access

Status
Not open for further replies.

Vishesh78

Programmer
Jul 4, 2011
3
IN
I have around 300,000 rows of data in Excel that I need to export to Access.
One way to do that is to loop through the data and add records one by one.
Another, manually open Access and use Get External Data option to import into Access. However, I want to automate this latter option from Excel...In Excel I want to write a function that takes excel range, access db and table as parameter and uses Access's Docmd.transferspreadsheet command...all this from Excel without having to open Access. I want to avoid having to loop record by record.
Still another method that I used with lesser no. of records (upto 60000 rows) is to create a sql query on excel range and insert into access at one go. It doesn't work with large no. of data though.
 

...and the question is...?

If there IS a question, what have you tried so far?
And where are you stuck?

Have fun.

---- Andy
 
This is what I do...manually open Access and use Get External Data option to import into Access. However, I want to automate this from Excel...In Excel I want to write a function that takes excel range, access db and table as parameter and uses Access's Docmd.transferspreadsheet command...all this from Excel without having to open Access. I want to avoid having to loop record by record.

I am not able to use Docmd.transferspreadsheet from Excel and don't know how/where to set database path.
 

Under Tools-->References.
Have you selected Microsoft Access 12.0 Object Library?

Randy
 
Yes I did...but don't know how to put this all together.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top