Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
725
Excel. Set print area
posted

I'm working with Infragistics3.Documents.Excel.v11.1 (version 11.1.20111.2009)

How can I set the print area (Page Setup) with programing code:
   - The scaling of the print area (set at x%)
   - Adjust the number of pages per High
   - Margins (Top, Bottom, Left, Right, Footer)
   - Center on page (horizontal, vertical)

Thank you in advance for your replay.

Parents
No Data
Reply
  • 44743
    Verified Answer
    posted

    All print options are stored on the Worksheet.PrintOptions.

    ddol said:
    The scaling of the print area (set at x%)

    Set the Worksheet.PrintOptions.ScalingType to UseScalingFactor

    and the Worksheet.PrintOptions.ScalingFactor to a value from 10 to 400.

    ddol said:
    Adjust the number of pages per High

    I'm not sure what you mean by this? Could you elaborate. If you are referring to the number of copies, you can set the Worksheet.PrintOptions.NumberOfCopies.

    ddol said:
    Margins (Top, Bottom, Left, Right, Footer)

    Set the folllowing properties on Worksheet.PrintOptions: TopMargin, BottomMargin, LeftMerging, and RightMargin.

    ddol said:
    Center on page (horizontal, vertical)

    Set the following properties on Worksheet.PrintOptions: CenterHorizontally and CenterVertically.

Children