Ciao,
prova ad dare un'occhiata al seguente codice V B S c r i p t:
Dim xls,cn,rs
Set cn = CreateObject("ADODB.Connection")
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\test.mdb"
Set rs = CreateObject("ADODB.Recordset")
rs.Open "tblPersone",cn,1,2
Set xls = CreateObject("Excel.Application")
With xls.Workbooks.Open( "c:\persone.xls" )
.Activate
With .Worksheets("foglio1")
For i=1 to .Usedrange.Rows.Count
rs.Addnew
rs.Fields("Nome").Value = .Cells(i,1)
rs.Fields("Cognome").Value = .Cells(i,2)
rs.Fields("Eta").Value = .Cells(i,3)
rs.Update
Next
End With
.Close false
End With
xls.Quit
Set xls = Nothing
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
MsgBox "Fatto!"
Questa semplice routine accoda il contenuto del file persone.xls (foglio1) nel database test.mdb (tblPersone): con pochi accorgimenti dovrestri poterlo adattare alle tue esigenze.
Ciao ciao