If !IsClassRegistered("Excel.Application") Messagebox("Excel is not installed") Else OpenMyXLS("C:\estaib\archivos\abril2006.xls") Endif Procedure OpenMyXLS(m.tcXLSFile) oExcel = Createobject("Excel.application") With oExcel .Workbooks.Open(m.tcXLSFile) .Visible = .T. With .ActiveWorkBook.ActiveSheet .Range("E:E").Numberformat = "#,##0" .Range("F:F").Numberformat = "#,##0.00" .Range("A1:F1").Font.Bold=.T. With .Range("A:F").Font .Size=10 .Name='Tahoma' Endwith .Range("A:F").EntireColumn.AutoFit .Range("A1:F1").HorizontalAlignment = -4108 .Range("A1:F1").VerticalAlignment = -4108 Endwith .ActiveWorkbook.Save ENDWITH endprocCetin