centrar titulos
Publicado por Noe (12 intervenciones) el 23/01/2009 16:08:44
Hola estimado foro !!
espero me puedan ayudar de antemano les doy las gracias.
tengo el siguiente codigo, copia los registros que tengo en una tabla ( VISULA FOXPRO ) a una hoja de Excel todo trabaja correctamente, pero no puedo centrar los titulo que estan dentro del rango ( A:1 D:1 )
Close Tables All
Use Base
Hoja_Xls = Sys(5)+Curdir()+'Pagina'+".xls"
Copy Fields num_emp,nombre,direccion,telefono ;
To (Hoja_Xls) Type Xl5
oExcel = Createobject('Excel.Application')
With oExcel
.workbooks.Open(Hoja_Xls)
.ActiveWorkbook.ActiveSheet.UsedRange.Columns.Autofit
.Selection.EntireRow.Insert
.ActiveCell.FormulaR1C1 = "DELEGACION CUAUHTEMOC"
.Range("A2").Select
.Selection.EntireRow.Insert
.ActiveCell.FormulaR1C1 = "SUBDIRECCION DE RECURSOS HUMANOS"
.Range("A3").Select
.Selection.EntireRow.Insert
.ActiveCell.FormulaR1C1 = "U.D. DE MOVIMIENTOS DE PERSONAL"
.Range("A4").Select
.Selection.EntireRow.Insert
.ActiveCell.FormulaR1C1 = "REPORTE DE EMPLEADOS"
.ActiveWorkbook.Save
.Visible = .T.
Endwith
With oExcel
.Range("A1:D1").Select
Endwith
espero me puedan ayudar de antemano les doy las gracias.
tengo el siguiente codigo, copia los registros que tengo en una tabla ( VISULA FOXPRO ) a una hoja de Excel todo trabaja correctamente, pero no puedo centrar los titulo que estan dentro del rango ( A:1 D:1 )
Close Tables All
Use Base
Hoja_Xls = Sys(5)+Curdir()+'Pagina'+".xls"
Copy Fields num_emp,nombre,direccion,telefono ;
To (Hoja_Xls) Type Xl5
oExcel = Createobject('Excel.Application')
With oExcel
.workbooks.Open(Hoja_Xls)
.ActiveWorkbook.ActiveSheet.UsedRange.Columns.Autofit
.Selection.EntireRow.Insert
.ActiveCell.FormulaR1C1 = "DELEGACION CUAUHTEMOC"
.Range("A2").Select
.Selection.EntireRow.Insert
.ActiveCell.FormulaR1C1 = "SUBDIRECCION DE RECURSOS HUMANOS"
.Range("A3").Select
.Selection.EntireRow.Insert
.ActiveCell.FormulaR1C1 = "U.D. DE MOVIMIENTOS DE PERSONAL"
.Range("A4").Select
.Selection.EntireRow.Insert
.ActiveCell.FormulaR1C1 = "REPORTE DE EMPLEADOS"
.ActiveWorkbook.Save
.Visible = .T.
Endwith
With oExcel
.Range("A1:D1").Select
Endwith
Valora esta pregunta


0