>>oleApp = CreateObject("Excel.Application") >>OleApp.Visible = .T. >>OleApp.WorkBooks.Add >>lncounter = 3 >>OleApp.cells(lnCounter,3).value = "ID" >>Oleapp.Cells.HorizontalAlignment = -4107 >>Oleapp.Selection.HorizontalAlignment = -4107 >>OleApp.cells(lnCounter,3).HorizontalAlignment = -4107 >>>
>#define xlCenter -4108 >#define xlDown -4121 >... >With toExcel > .ActiveSheet.Rows("1:4").Select > .Selection.Insert( xlDown) > .Range("A1:S1").Select > With .Selection > .ClearContents > .Merge > .HorizontalAlignment = xlCenter > With .Font > .Name = "Arial" > .FontStyle = "Bold" > .Size = 12 > EndWith > EndWith > > .Range("A2:S2").Select > With .Selection > .ClearContents > .Merge && merging the cells in the range > .HorizontalAlignment = xlCenter > EndWith >>