oExcel = createobject("Excel.application") with oExcel .Workbooks.Open("c:\my fullpath\myexcelfile.xls") .visible = .t. .ActiveWorkBook.ActiveSheet.Range("C:D").Numberformat = "yourformathere" endwithThis is a very simple sample to open an exusting excel file and format columns C,D.