Fijar encabezado en excel

367 views
Skip to first unread message

JCReyna

unread,
May 18, 2011, 2:00:55 PM5/18/11
to Comunidad de Visual Foxpro en Español
Saludos al foro, alguien me podria decir como fijar por programacion
los encabezados en una hoja de excel.


Gracias de antemano

Yvan GMAIL

unread,
May 18, 2011, 2:26:40 PM5/18/11
to publice...@googlegroups.com
Te refieres a esto?

oForm = _ESPERE("Inicializando exportación, espere un momento por
favor...........")
oleApp = CREATEOBJECT("Excel.Application")
oForm.LblTitulo.Caption = "Creando Archivo " + cFile_Destino
OleApp.Workbooks.Add
OleApp.Visible = .T.
OleApp.Sheets("Hoja1").Select
OleApp.Sheets("Hoja1").Name = "Cotizacion " + XFL_NROCOT
oForm.LblTitulo.Caption = "Cotizacion " + XFL_NROCOT

Thisform.mConfigura_Celdas("A1:H100","Tahoma","Normal","9",0)
Sele RSFILTRO
GO TOP
oForm.LblTitulo.Caption = "Estableciendo encabezado de cotización....."
****************************************************************************
*
* Estableciendo Encabezado de Cotización
****************************************************************************
*
**** INSERTANDO LOGOS DE FLUIDTEK

OleApp.ActiveSheet.PageSetup.LeftHeaderPicture.Filename = GDBC(3) +
"FLUIDTEK.jpg"
OleApp.ActiveSheet.PageSetup.CenterHeaderPicture.Filename = GDBC(3) +
"TEXTO MEDIO.JPG"
OleApp.ActiveSheet.PageSetup.RightHeaderPicture.Filename = GDBC(3) +
"NOGREN.JPG"

With OleApp.ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
EndWith
OleApp.ActiveSheet.PageSetup.PrintArea = ""
With OleApp.ActiveSheet.PageSetup
.LeftHeader = "&G"
.CenterHeader = "&G"
.RightHeader = "&G"
.LeftFooter = "Jr. Raul Porras Barrenechea 2134 - Chacra
Rios Lima 01, PERU" + Chr(10) + "ven...@fluidteksrl.com" + Chr(10) +
"www.fluidteksrl.com"
.RightFooter = "Telfs.:(01) 337-7364 " + Chr(10) + "Fax:
(01) 425-7962" + Chr(10) + "Nextel : 9814*3608"
.CenterFooter = ""
.LeftMargin = OleApp.Application.InchesToPoints(0.50)
.RightMargin = Oleapp.Application.InchesToPoints(0.50)
.TopMargin = OleApp.Application.InchesToPoints(1.30)
.BottomMargin = OleApp.Application.InchesToPoints(0.90)
.HeaderMargin = OleApp.Application.InchesToPoints(0.75)
.FooterMargin = OleApp.Application.InchesToPoints(0.10)
.CenterHorizontally = .F.
.CenterVertically = .F.
.Orientation = 1 && xlPortrait
.Draft = .F.
.PaperSize = 9 && xlPaperA4
.Order = 1 && xlDownThenOver
.FitToPagesWide = 1
.FitToPagesTall = 1
.Zoom = .F.
EndWith


-----Mensaje original-----
De: publice...@googlegroups.com
[mailto:publice...@googlegroups.com] En nombre de JCReyna
Enviado el: Miércoles, 18 de Mayo de 2011 01:01 p.m.
Para: Comunidad de Visual Foxpro en Español
Asunto: [vfp] Fijar encabezado en excel

andres recio

unread,
May 18, 2011, 2:27:16 PM5/18/11
to publice...@googlegroups.com
lo mejor q podes hacer es crear una macro con lo q qres hacer y despues lo pasas a fox.....si te interesa mirate la libreria q subi al grupo para crear hojas de calculo pero con opon office. Saludos

JCReyna

unread,
May 18, 2011, 5:49:08 PM5/18/11
to Comunidad de Visual Foxpro en Español
Gracias por su colaboracion, ya lo pude solucionar de la siguiente
forma:


renglon = numero de renglon donde terminan los encabezados + 1
columna = 1

.CELLS(renglon,columna).SELECT
.ActiveWindow.FreezePanes = .T.
Reply all
Reply to author
Forward
0 new messages