1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| ---------------------------------------------------------------
'Connection to PlanningPME
'Register PlanningPME.dll before -> c:\windows\system32\regsvr32
PlanningPME.dll
Set ppme = CreateObject("PlanningPME.Application")
ppme.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Rose\Desktop\test_import.pp"
ppme.Connect
'Connection to Excel
Set Connection = CreateObject("ADODB.Connection")
'VB
Connection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\clients.dbf; Extended Properties=" & Chr(34) & "Excel 8.0;HDR=Yes;IMEX=1" & Chr(34)"
'pour le fichier dbf j'ai essayé sans succès avec ça: Extended Properties=dBASE IV
Set rs = CreateObject("ADODB.Recordset")
Set search = CreateObject("ADODB.Recordset")
rs.Open "select * from [defa0006$]", Connection
'boucle pour importer les donnees
While rs.EOF = False
..........................
rs.MoveNext
Wend |
Partager