General information
Category:
Coding, syntax & commands
Environment versions
Network:
Windows 2003 Server
Thanks a lot for your help, but I allready done it....
This is the final code, I wonder if you say any comments about it....
if !IsClassRegistered("Excel.Application")
messagebox("Excel is not installed")
else
a="C:\estaib\archivos\abril2006.xls"
b="C:\estaib\archivos\rankingabril2006.xls"
oExcel = createobject("Excel.application")
with oExcel
.Workbooks.Open(a)
.visible = .t.
.ActiveWorkBook.ActiveSheet.Range("E:E").Numberformat = "#,##0"
.ActiveWorkBook.ActiveSheet.Range("F:F").Numberformat = "#,##0.00"
.ActiveWorkBook.ActiveSheet.Range("A1:F1").Font.Bold=.t.
.ActiveWorkBook.ActiveSheet.Range("A1:F65536").Font.Size=10
.ActiveWorkBook.ActiveSheet.Range("A1:F65536").Font.Name='Tahoma'
.ActiveWorkBook.ActiveSheet.Range("A1:F65536").EntireColumn.AutoFit
.ActiveWorkBook.ActiveSheet.Range("A1:F1").HorizontalAlignment = -4108
.ActiveWorkBook.ActiveSheet.Range("A1:F1").VerticalAlignment = -4108
.ActiveWorkbook.Save
.Workbooks.Open(b)
.visible = .t.
.ActiveWorkBook.ActiveSheet.Range("C:C").Numberformat = "#,##0.00"
.ActiveWorkBook.ActiveSheet.Range("D:D").Numberformat = "#,##0"
.ActiveWorkBook.ActiveSheet.Range("A1:F1").Font.Bold=.t.
.ActiveWorkBook.ActiveSheet.Range("A1:F65536").Font.Size=10
.ActiveWorkBook.ActiveSheet.Range("A1:F65536").Font.Name='Tahoma'
.ActiveWorkBook.ActiveSheet.Range("A1:F65536").EntireColumn.AutoFit
.ActiveWorkBook.ActiveSheet.Range("A1:F1").HorizontalAlignment = -4108
.ActiveWorkBook.ActiveSheet.Range("A1:F1").VerticalAlignment = -4108
.ActiveWorkbook.Save
endwith
endif
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only