
11/09/2006, 11:11
|
 | | | Fecha de Ingreso: septiembre-2006
Mensajes: 16
Antigüedad: 18 años, 7 meses Puntos: 0 | |
Este es un procedimiento para copiar de un Flexgrid a excel
Private Sub GeneroArchivoExcel()
Dim objExcel As Object
Dim objLibro As Object
Set objExcel = CreateObject("Excel.Application")
Set objLibro = objExcel.Workbooks.Add(App.Path & "\Grilla.xls")
Dim F As Integer, K As Integer
With objLibro
With .Sheets(1)
For F = 0 To hfxLis.Rows - 1
For K = 0 To hfxLis.Cols - 1
.Cells(F + 1, K + 1) = hfxLis.TextMatrix(F, K)
Next
Next
End With
End With
objExcel.Visible = True
Set objLibro = Nothing
Set objExcel = Nothing
End Sub |