01-01-14, 03:48 PM
السلام عليكم
إليك متال على إرسال المعلومات إل EXCEL
إليك متال على إرسال المعلومات إل EXCEL
Private Sub Command11_Click()
Dim DExcel As Object
Dim ColHeader As Variant
Dim intRow As Integer
Dim intcol As Integer
Set DExcel = CreateObject("Excel.Application")
ColHeader = Array("A", "B", "C", "D", "E", "F", "G", "H")
DExcel.DisplayAlerts = False
DExcel.Workbooks.Add
DExcel.Sheets("Feuil1").Select
DExcel.Sheets("Feuil1").Name = "LISTE DES PARENTS"
With msflexgrid
For intRow = 0 To .Rows - 1
For intcol = 0 To .Cols - 1
DExcel.Range(ColHeader(intcol) & (intRow + 1)).BorderAround Color:=vbBlack
DExcel.Range(ColHeader(intcol) & (intRow + 1)) = .TextMatrix(intRow, intcol)
Next intcol
Next intRow
End With
DExcel.ActiveWorkbook.Close True, "C:\MonFichier.xls"
DExcel.Quit
End Sub
Dim DExcel As Object
Dim ColHeader As Variant
Dim intRow As Integer
Dim intcol As Integer
Set DExcel = CreateObject("Excel.Application")
ColHeader = Array("A", "B", "C", "D", "E", "F", "G", "H")
DExcel.DisplayAlerts = False
DExcel.Workbooks.Add
DExcel.Sheets("Feuil1").Select
DExcel.Sheets("Feuil1").Name = "LISTE DES PARENTS"
With msflexgrid
For intRow = 0 To .Rows - 1
For intcol = 0 To .Cols - 1
DExcel.Range(ColHeader(intcol) & (intRow + 1)).BorderAround Color:=vbBlack
DExcel.Range(ColHeader(intcol) & (intRow + 1)) = .TextMatrix(intRow, intcol)
Next intcol
Next intRow
End With
DExcel.ActiveWorkbook.Close True, "C:\MonFichier.xls"
DExcel.Quit
End Sub

