an excel sheet with data and now I necessity to prepare to print
The required settings are:
- 1 page on width
- first row to title
- print grid
- to set the orientation if the cOriente contain "V" Portrait or "O" for
Landscape.
This code do not work:
- Code: Select all Expand view RUN
WITH OBJECT oExcel:ActiveWorkbook:Worksheets("Sheet1"):PageSetup()
:PrintTitleRows := "$1:$1"
:PrintTitleColumns := ""
END
// oExcel:ActiveWorkbook:Worksheets("Sheet1"):PageSetup:PrintArea := ""
WITH OBJECT oExcel:ActiveWorkbook:Worksheets("Sheet1"):PageSetup()
// :Orientation := IF( cOriente == "V",xlPortrait,xlLandscape )
:PrintGridlines := 1 // True
:PrintHeadings := 0 // False
// :Zoom := 0 // False
:FitToPagesWide := 1
:FitToPagesTall := 0
// :PrintErrors := 0 // xlPrintErrorsDisplayed
END
PrintArea, Orientation, Zoom and PrintErrors create errors
Can you help me?