*-- set pageSetup properties with oXLS.application.ActiveSheet.PageSetup *.LeftHeader = "" .CenterHeader = m.lcTableName .RightHeader = NiceFormatDate(date()) .LeftFooter = icMessageBoxCaption .RightFooter = "&P of &N" * .RightFooter = "&D - &T" .LeftMargin = cnCentimetersToPoints * 1.9 .RightMargin = cnInchesToPoints * 0.27244094488189 .TopMargin = cnInchesToPoints * 0.47244094488189 .BottomMargin = cnInchesToPoints * 0.47244094488189 .HeaderMargin = cnInchesToPoints * 0.236220472440945 .FooterMargin = cnInchesToPoints * 0.236220472440945 .PrintHeadings = .f. && Don't want to print Excel Headings .PrintGridlines = .t. *.PrintComments = xlPrintNoComments *.PrintQuality = 600 .CenterHorizontally = .t. *.CenterVertically = .t. .orientation = xlLandscape *.Draft = .f. *.PaperSize = xlPaperA4 *.FirstPageNumber = xlAutomatic *.Order = xlDownThenOver *.BlackAndWhite = .f. .zoom = .f. .FitToPagesWide = 1 .FitToPagesTall = .f. .PrintTitleRows = "$1:$1" && repeats header on each page endwith