wenas compañeros, eh alguien no tendra por ahi algun code para exportar datos de listview a la hoja de calculo del OpenOffice, yo tengo un code para exportar al excel que es de esta manera.
Private Sub Exportar()
Dim objExcel As Excel.Application
Dim Ancho As Integer
Dim Dato As Variant
Dim c As Integer
Dim f As Integer
Dim ColumnaExcel As Integer
Set objExcel = New Excel.Application
With objExcel
.Visible = False
.SheetsInNewWorkbook = 1 'Determina el numero de hojas que se mostrara en el Excel
.Workbooks.Add 'Crea el Libro
.Sheets("Hoja1").Name = "Registre"
'Recorrer las celdas del Listview
'----------------------------------------------
' Bucle principal
'---------------------------------------------
For f = 0 To ListSearch.ListItems.Count
ColumnaExcel = 1
For c = 1 To ListSearch.ColumnHeaders.Count
If f = 0 Then ' Títulos
.Cells(1, ColumnaExcel) = ListSearch.ColumnHeaders(c).Text
Else
If c = 1 Then
.Cells(f + 1, 1) = ListSearch.ListItems(f).Text
Else
Dato = ListSearch.ListItems(f).SubItems(c - 1)
' Prevención para que las fechas pasen a Excel como tales
' En mi listview los títulos de las columnas fecha empiezan con F.
If Left(ListSearch.ColumnHeaders(c).Text, 2) = "F." And Dato <> "" Then Dato = CDate(Dato)
.Cells(f + 1, ColumnaExcel) = Dato
End If
.Cells(f + 1, ColumnaExcel + 1).Select
ColumnaExcel = ColumnaExcel + 1
End If
Next
Next
'----------------------------------------------
' Fin del Bucle principal
'---------------------------------------------
.Range("A1").Select
.Range(.Selection, .Selection.End(xlToRight)).Select
PonerSombraCelda objExcel, 15, xlSolid
PonerBordeCelda objExcel
.Range(.Selection, .Selection.End(xlDown)).Select
PonerBordeCelda objExcel
.Cells.Select
.Selection.WrapText = False
.Cells.EntireColumn.AutoFit
.Range("A1").Select
End With
'Preparar impresión en apasiado y a una hoja de ancho
With objExcel.ActiveSheet.PageSetup
.Orientation = xlLandscape
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
End With
'fraRegistros.Visible = False
objExcel.Visible = True
Set objExcel = Nothing
Screen.MousePointer = vbDefault
End Sub
Private Sub PonerBordeCelda(Objeto As Excel.Application)
With Objeto
.Selection.Borders(xlEdgeLeft).Weight = xlThick
.Selection.Borders(xlEdgeTop).Weight = xlThick
.Selection.Borders(xlEdgeBottom).Weight = xlThick
.Selection.Borders(xlEdgeRight).Weight = xlThick
.Selection.Borders(xlInsideVertical).Weight = xlThin
.Selection.Borders(xlInsideHorizontal).Weight = xlThin
End With
End Sub
Private Sub PonerSombraCelda(Objeto As Excel.Application, ColorIndex As _
Integer, Pattern As Integer)
With Objeto.Selection.Interior
.ColorIndex = ColorIndex
.Pattern = Pattern
End With
End Sub
De esa manera exporto mi datos a Excel pero no tengo la mas remota idea para enviar los datos al OpenOffice estuve investigando en Google y no encontre ningun ejemplo como en el trabajo han estado instalando el Open y weno me pidieron que tambien los datos que tengo se exporten al open, alguien me puede decir al menos de donde sacar informacion al respecto gracias, Salu2....