I think this piece of code will give you an idea to read from excel into access table....
Dim a As Object
Dim w As Object
Dim WSN As Object
dim filename as string
'define all the fields accordingly
filename = "c:\xxxxxx.xls"
Set a = CreateObject("Excel.Application"
Set w = a.Workbooks.Add(filename)
Set WSN = w.Worksheets(1)
WSN.Activate
set rs = db.openrecordset("select * from accesstable"
for x = 1 to lastlineof the worksheet
rs.addnew
rs.field1 = activesheet.cells(x,1)
rs.field2 = activesheet.cells(x,2)
........ all fields
next x
hope it helps
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.