Version

GetPrintOptions Method

Gets the print options associated with the specified worksheet.
Syntax
public PrintOptions GetPrintOptions( 
   Worksheet worksheet,
   bool createIfNull
)

Parameters

worksheet
The worksheet whose associated print options are to be retrieved.
createIfNull
True to create the print options if it has not yet been allocated. The options will be initialized based on the current state of the Worksheet. Note the options should only have been null if there were no options for the Worksheet when the Workbook was loaded. Also this will not allocate the collection unless the SavePrintOptions is true.

Return Value

Null if SavePrintOptions is False or if the worksheet does not belong to the workbook associated with this custom view; otherwise, the print options associated with the worksheet.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionworksheet is null.
Remarks

Setting properties on the returned PrintOptions instance will not change the actual print settings of the worksheet. After setting properties, the Apply method of the CustomView will apply them to the worksheet.

Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also