urge ayuda para pasar un report form a excel .urge !!!!!
que hago para copiar la informacion de un report form a excel tengo un visual fox pro 6 corriendo y un excel 2000 , se tiene que copiar como excel, para despues poderlo trabajar ese misma informacion en excel. urge ... por su ayuda gracias
mira pablin este es un reporte que yo importo a excel de VFP sin importar la versi贸n solo cambia las tablas y titulos en tu caso.
WAIT WINDOW "Generando Hoja Electronica" NOWAIT
m.objExcel = CREATEOBJECT("excel.application")
m.objExcel.WorkBooks.Add
m.objExcel.Cells(1,2).columnWidth = 34
m.objExcel.Range("C1","H1").ColumnWidth = 2.71
*!* Titulos de cada Columna.
m.objExcel.Cells(6,1).Value = "Fecha.:"
m.objExcel.Cells(6,1).HorizontalAlignment = 4
m.objExcel.Cells(6,1).Font.Bold = .t.
m.objExcel.Range("A6","B6").Font.Italic = .t.
m.objExcel.Range("A6","B6").Font.Name = "Times New Roman"
m.objExcel.Range("A6","B6").Font.Size = 10
m.objExcel.Cells(6,2).Value = hoy(m.sFecha)
m.objExcel.Cells(7,1).Value = "C贸digo"
m.objExcel.Cells(7,2).Value = "Nombre Completo"
m.objExcel.Cells(7,3).Value = "Entrada"
m.objExcel.Cells(8,3).Value = "H"
m.objExcel.Cells(8,4).Value = "M"
m.objExcel.Cells(8,5).Value = "T"
m.objExcel.Cells(7,6).Value = "Salida"
m.objExcel.Cells(8,6).Value = "H"
m.objExcel.Cells(8,7).Value = "M"
m.objExcel.Cells(8,8).Value = "T"
*!*
m.objExcel.Range("A7","A8").MergeCells = 1
m.objExcel.Range("A7","F7").HorizontalAlignment = 3
m.objExcel.Range("A7","B7").VerticalAlignment = 2
m.objExcel.Range("B7","B8").MergeCells = 1
m.objExcel.Range("C7","E7").MergeCells = 1
m.objExcel.Range("F7","H7").MergeCells = 1
m.objExcel.Range("A7","H"+LTRIM(STR(RECCOUNT()+9))).Font.Name = "Courir New"
m.objExcel.Range("A7","H"+LTRIM(STR(RECCOUNT()+9))).Font.Size = 8
m.objExcel.Range("A7","H"+LTRIM(STR(RECCOUNT()+9))).Borders.LineStyle = 1
m.objExcel.Range("A9","A"+LTRIM(STR(RECCOUNT()+9))).HorizontalAlignment = 3
m.objExcel.Range("C8","H"+LTRIM(STR(RECCOUNT()+9))).HorizontalAlignment = 3
STORE 9 TO m.xLine
SCAN
m.objExcel.Cells(m.xLine,1).value = empleado
m.objExcel.Cells(m.xLine,2).Value = nombre
m.objExcel.Cells(m.xLine,3).Value = horae
m.objExcel.Cells(m.xLine,4).Value = minutoe
m.objExcel.Cells(m.xLine,5).Value = terminale
m.objExcel.Cells(m.xLine,6).Value = horas
m.objExcel.Cells(m.xLine,7).Value = minutos
m.objExcel.Cells(m.xLine,8).Value = terminals
m.xLine = m.xLine + 1
ENDSCAN
WAIT WINDOW "Hoja Electronica Termina" NOWAIT
m.objExcel.ActiveWindow.DisplayGridLines = .f.
m.objExcel.Visible = .t.
RELEASE m.objExcel
*!* Espero te sirva, es m谩s en este presiso momento estoy terminando esta opcion a excel.
WAIT WINDOW "Generando Hoja Electronica" NOWAIT
m.objExcel = CREATEOBJECT("excel.application")
m.objExcel.WorkBooks.Add
m.objExcel.Cells(1,2).columnWidth = 34
m.objExcel.Range("C1","H1").ColumnWidth = 2.71
*!* Titulos de cada Columna.
m.objExcel.Cells(6,1).Value = "Fecha.:"
m.objExcel.Cells(6,1).HorizontalAlignment = 4
m.objExcel.Cells(6,1).Font.Bold = .t.
m.objExcel.Range("A6","B6").Font.Italic = .t.
m.objExcel.Range("A6","B6").Font.Name = "Times New Roman"
m.objExcel.Range("A6","B6").Font.Size = 10
m.objExcel.Cells(6,2).Value = hoy(m.sFecha)
m.objExcel.Cells(7,1).Value = "C贸digo"
m.objExcel.Cells(7,2).Value = "Nombre Completo"
m.objExcel.Cells(7,3).Value = "Entrada"
m.objExcel.Cells(8,3).Value = "H"
m.objExcel.Cells(8,4).Value = "M"
m.objExcel.Cells(8,5).Value = "T"
m.objExcel.Cells(7,6).Value = "Salida"
m.objExcel.Cells(8,6).Value = "H"
m.objExcel.Cells(8,7).Value = "M"
m.objExcel.Cells(8,8).Value = "T"
*!*
m.objExcel.Range("A7","A8").MergeCells = 1
m.objExcel.Range("A7","F7").HorizontalAlignment = 3
m.objExcel.Range("A7","B7").VerticalAlignment = 2
m.objExcel.Range("B7","B8").MergeCells = 1
m.objExcel.Range("C7","E7").MergeCells = 1
m.objExcel.Range("F7","H7").MergeCells = 1
m.objExcel.Range("A7","H"+LTRIM(STR(RECCOUNT()+9))).Font.Name = "Courir New"
m.objExcel.Range("A7","H"+LTRIM(STR(RECCOUNT()+9))).Font.Size = 8
m.objExcel.Range("A7","H"+LTRIM(STR(RECCOUNT()+9))).Borders.LineStyle = 1
m.objExcel.Range("A9","A"+LTRIM(STR(RECCOUNT()+9))).HorizontalAlignment = 3
m.objExcel.Range("C8","H"+LTRIM(STR(RECCOUNT()+9))).HorizontalAlignment = 3
STORE 9 TO m.xLine
SCAN
m.objExcel.Cells(m.xLine,1).value = empleado
m.objExcel.Cells(m.xLine,2).Value = nombre
m.objExcel.Cells(m.xLine,3).Value = horae
m.objExcel.Cells(m.xLine,4).Value = minutoe
m.objExcel.Cells(m.xLine,5).Value = terminale
m.objExcel.Cells(m.xLine,6).Value = horas
m.objExcel.Cells(m.xLine,7).Value = minutos
m.objExcel.Cells(m.xLine,8).Value = terminals
m.xLine = m.xLine + 1
ENDSCAN
WAIT WINDOW "Hoja Electronica Termina" NOWAIT
m.objExcel.ActiveWindow.DisplayGridLines = .f.
m.objExcel.Visible = .t.
RELEASE m.objExcel
*!* Espero te sirva, es m谩s en este presiso momento estoy terminando esta opcion a excel.
