re ,
voila en dessous le corps du fichier dll , d apres ce que j ai lu dans qq topic qu on a seulement besoin d appeller la fonction dans le projet ou on y integre ce fichier dll mais ca marche pa , côté enregistrement j en connais pa trop c a dire que je l ai pas fait lol
Option Explicit
Function to_excel(dbrs As ADODB.Recordset, nom_fichier As String)
Dim i As Integer
Dim j As Integer
Dim myap As New Excel.Application
Dim myxl As New Excel.Workbook
Set myap = CreateObject("excel.application")
Set myxl = myap.Workbooks.Add
Set dbrs = New ADODB.Recordset
myxl.SaveAs nom_fichier
While Not dbrs.EOF
For i = 1 To dbrs.RecordCount
For j = 1 To dbrs.Fields.Count
If (i = 1) Then
myxl.Sheets(1).Cells(i, j) = dbrs(j - 1).Name
myxl.Sheets(1).Cells(i + 1, j) = dbrs(j - 1).Value
Else
myxl.Sheets(1).Cells(i + 1, j) = dbrs(j - 1).Value
End If
Next j
dbrs.MoveNext
Next i
Wend
myxl.Save
myxl.Close
End Function