FoxPro/Visual FoxPro - EXPORTAR A EXCEL

 
Vista:
sin imagen de perfil

EXPORTAR A EXCEL

Publicado por enrique (148 intervenciones) el 22/04/2015 21:32:15
HOLA SRES.

MIGRO UNA TABLA DBF VFP 9 A EXCEL CON EL COPY TO.

COMO HAGO DESDE VFP INSERTAR UNA FILA EN EL ENCABEZADO (A1) Y PONER UN TITULO.

GRACIAS.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

EXPORTAR A EXCEL

Publicado por Ernesto Hernandez (4623 intervenciones) el 23/04/2015 17:14:31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
XLSApp = Createobject("Excel.Application")
XLSApp.WorkBooks.add(a)
XLSheet = XLApp.ActiveSheet
 
FOR i=1 TO 4
XLSheet.Rows("1:1").Insert
 
ENDFOR
XLSApp.APPLICATION.activeworkbook.activesheet.cells(3,1).SELECT
XLSApp.APPLICATION.activeworkbook.activesheet.cells(3,1).value="Mi Reporte"
XLSApp.APPLICATION.activecell.FONT.NAME = "Verdana"
XLSApp.APPLICATION.activecell.FONT.SIZE = 16
XLSApp.APPLICATION.activecell.FONT.Bold = .T.
XLSApp.APPLICATION.activecell.FONT.Italic = .T.
XLSApp.APPLICATION.activecell.HorizontalAlignment=-4108
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

EXPORTAR A EXCEL

Publicado por enrique (148 intervenciones) el 24/04/2015 05:19:56
como indico que archivo en excel es. ejm. padron.xls
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

EXPORTAR A EXCEL

Publicado por wences (5 intervenciones) el 09/06/2016 16:54:43
1
2
3
4
5
6
7
8
9
oExcel = CreateObject("Excel.Application")
if vartype(oExcel) != "O"
	* could not instantiate Excel object
	* show an error message here
	return .F.
endif
 
cFileXLS = Getfile("XLS,XLSX")
oWorkbook = oExcel.Application.Workbooks.Open(cFileXLS)

Así eliges el excel ... si sabes el nombre lo puedes escribir directamente
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar