lcXLS = Sys(5)+Curdir()+'customer.xls' Use customer Copy To (lcXLS) Type Xl5 Use * Line styles #Define xlContinuous 1 #Define xlDash -4115 #Define xlDashDot 4 #Define xlDashDotDot 5 #Define xlDot -4118 #Define xlDouble -4119 #Define xlSlantDashDot 13 #Define xlLineStyleNone -4142 * Border index #Define xlInsideHorizontal 12 #Define xlInsideVertical 11 #Define xlDiagonalDown 5 #Define xlDiagonalUp 6 #Define xlEdgeBottom 9 #Define xlEdgeLeft 7 #Define xlEdgeRight 10 #Define xlEdgeTop 8 * Weight #Define xlHairline 1 #Define xlMedium -4138 #Define xlThick 4 #Define xlThin 2 oExcel = Createobject('Excel.Application') With oExcel .Workbooks.Open(lcXLS) .Visible = .T. With .ActiveWorkbook.ActiveSheet.UsedRange With .Borders .LineStyle = xlDouble .ColorIndex = 5 EndWith With .Borders(xlInsideVertical) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = 7 Endwith With .Borders(xlInsideHorizontal) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = 3 ENDWITH * Font change on some range .Rows(2).Font.Bold = .T. .Columns(2).Font.Bold = .T. .Cells(5,4).Font.Bold = .T. * cell color .Cells(2,3).Interior.Color = RGB(0,255,255) ENDWITH EndwithCetin
>>>>>OleApp.cells(lnCounter,3).Select && selects the individual cell >>>>>OleApp.cells.NumberFormat = "[$€-2] #,##0.00" && change the format of cell >>>>>>>>>Try:
>>>> OleApp.cells(lnCounter,3).NumberFormat = "[$€-2] #,##0.00" && change the format of cell >>>>Cetin