ExcelSheetPageSetupFluent
OfficeIMO.Excel
The fluent methods of ExcelSheetPageSetup, generated from its public properties: A property-named method sets a property and a singular-named method adds to a collection, both returning the same instance.
Inheritance
- object
- ExcelSheetPageSetupFluent
Methods
public static ExcelSheetPageSetup DifferentFirstPage(ExcelSheetPageSetup excelSheetPageSetup, bool value = true) #Sets ExcelSheetPageSetup.DifferentFirstPage: Whether the first page uses its own header and footer. Turning it on copies the running header and footer into a missing first-page variant; existing first-page text is kept when it is turned off.
Parameters
- excelSheetPageSetup OfficeIMO.Excel.ExcelSheetPageSetup
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
excelSheetPageSetup.DifferentFirstPage = value; excelSheetPageSetup.DifferentFirstPage(value);public static ExcelSheetPageSetup DifferentOddEven(ExcelSheetPageSetup excelSheetPageSetup, bool value = true) #Sets ExcelSheetPageSetup.DifferentOddEven: Whether even pages use their own header and footer. Turning it on copies the running header and footer into a missing even-page variant; existing even-page text is kept when it is turned off.
Parameters
- excelSheetPageSetup OfficeIMO.Excel.ExcelSheetPageSetup
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
excelSheetPageSetup.DifferentOddEven = value; excelSheetPageSetup.DifferentOddEven(value);public static ExcelSheetPageSetup FitToHeight(ExcelSheetPageSetup excelSheetPageSetup, uint? value) #Sets ExcelSheetPageSetup.FitToHeight: Pages to fit vertically when fit-to-page is on; null when it is off. Setting a value turns fit-to-page on. An omitted dimension defaults to one; zero leaves the axis unlimited.
Parameters
- excelSheetPageSetup OfficeIMO.Excel.ExcelSheetPageSetup
- The instance.
- value uint?
- The value.
Examples
// C# initializer or property // C# fluent
excelSheetPageSetup.FitToHeight = value; excelSheetPageSetup.FitToHeight(value);public static ExcelSheetPageSetup FitToWidth(ExcelSheetPageSetup excelSheetPageSetup, uint? value) #Sets ExcelSheetPageSetup.FitToWidth: Pages to fit horizontally when fit-to-page is on; null when it is off. Setting a value turns fit-to-page on. An omitted dimension defaults to one; zero leaves the axis unlimited.
Parameters
- excelSheetPageSetup OfficeIMO.Excel.ExcelSheetPageSetup
- The instance.
- value uint?
- The value.
Examples
// C# initializer or property // C# fluent
excelSheetPageSetup.FitToWidth = value; excelSheetPageSetup.FitToWidth(value);public static ExcelSheetPageSetup HorizontalCentered(ExcelSheetPageSetup excelSheetPageSetup, bool value = true) #Sets ExcelSheetPageSetup.HorizontalCentered: Whether the printed sheet is centered horizontally on the page.
Parameters
- excelSheetPageSetup OfficeIMO.Excel.ExcelSheetPageSetup
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
excelSheetPageSetup.HorizontalCentered = value; excelSheetPageSetup.HorizontalCentered(value);public static ExcelSheetPageSetup Margins(ExcelSheetPageSetup excelSheetPageSetup, OfficeLength left, OfficeLength right, OfficeLength top, OfficeLength bottom, OfficeLength? header = null, OfficeLength? footer = null) #Sets physical page margins. Omitted header and footer margins are 0.3 inches.
Parameters
- excelSheetPageSetup OfficeIMO.Excel.ExcelSheetPageSetup
- The instance.
- left OfficeIMO.OfficeLength
- The value.
- right OfficeIMO.OfficeLength
- The value.
- top OfficeIMO.OfficeLength
- The value.
- bottom OfficeIMO.OfficeLength
- The value.
- header OfficeIMO.OfficeLength? = null
- The value.
- footer OfficeIMO.OfficeLength? = null
- The value.
public static ExcelSheetPageSetup Margins(ExcelSheetPageSetup excelSheetPageSetup, ExcelMarginPreset preset) #Sets the margins of one of Excel's margin presets.
Parameters
- excelSheetPageSetup OfficeIMO.Excel.ExcelSheetPageSetup
- The instance.
- preset OfficeIMO.Excel.ExcelMarginPreset
- The value.
public static ExcelSheetPageSetup Orientation(ExcelSheetPageSetup excelSheetPageSetup, OfficePageOrientation? value) #Sets ExcelSheetPageSetup.Orientation: Page orientation; null when the worksheet does not store one (Excel prints portrait).
Parameters
- excelSheetPageSetup OfficeIMO.Excel.ExcelSheetPageSetup
- The instance.
- value OfficeIMO.OfficePageOrientation?
- The value.
Examples
// C# initializer or property // C# fluent
excelSheetPageSetup.Orientation = value; excelSheetPageSetup.Orientation(value);public static ExcelSheetPageSetup PageOrder(ExcelSheetPageSetup excelSheetPageSetup, ExcelPageOrder? value) #Sets ExcelSheetPageSetup.PageOrder: Order in which multi-page sheets print; null when none is stored.
Parameters
- excelSheetPageSetup OfficeIMO.Excel.ExcelSheetPageSetup
- The instance.
- value OfficeIMO.Excel.ExcelPageOrder?
- The value.
Examples
// C# initializer or property // C# fluent
excelSheetPageSetup.PageOrder = value; excelSheetPageSetup.PageOrder(value);public static ExcelSheetPageSetup PaperSize(ExcelSheetPageSetup excelSheetPageSetup, ExcelPaperSize? value) #Sets ExcelSheetPageSetup.PaperSize: Known paper size; null when none is stored or the stored code has no ExcelPaperSize value.
Parameters
- excelSheetPageSetup OfficeIMO.Excel.ExcelSheetPageSetup
- The instance.
- value OfficeIMO.Excel.ExcelPaperSize?
- The value.
Examples
// C# initializer or property // C# fluent
excelSheetPageSetup.PaperSize = value; excelSheetPageSetup.PaperSize(value);public static ExcelSheetPageSetup PrintArea(ExcelSheetPageSetup excelSheetPageSetup, string? value) #Sets ExcelSheetPageSetup.PrintArea: Print area as stored, with one or more comma-separated areas; null when none is set. Setting null removes it.
Parameters
- excelSheetPageSetup OfficeIMO.Excel.ExcelSheetPageSetup
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
excelSheetPageSetup.PrintArea = value; excelSheetPageSetup.PrintArea(value);public static ExcelSheetPageSetup PrintGridLines(ExcelSheetPageSetup excelSheetPageSetup, bool value = true) #Sets ExcelSheetPageSetup.PrintGridLines: Whether cell gridlines print.
Parameters
- excelSheetPageSetup OfficeIMO.Excel.ExcelSheetPageSetup
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
excelSheetPageSetup.PrintGridLines = value; excelSheetPageSetup.PrintGridLines(value);public static ExcelSheetPageSetup PrintHeadings(ExcelSheetPageSetup excelSheetPageSetup, bool value = true) #Sets ExcelSheetPageSetup.PrintHeadings: Whether row and column headings print.
Parameters
- excelSheetPageSetup OfficeIMO.Excel.ExcelSheetPageSetup
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
excelSheetPageSetup.PrintHeadings = value; excelSheetPageSetup.PrintHeadings(value);public static ExcelSheetPageSetup PrintTitles(ExcelSheetPageSetup excelSheetPageSetup, int? firstRow, int? lastRow, int? firstColumn = null, int? lastColumn = null) #Sets the rows and columns repeated on every printed page; nulls on both axes clear them.
Parameters
- excelSheetPageSetup OfficeIMO.Excel.ExcelSheetPageSetup
- The instance.
- firstRow int?
- The value.
- lastRow int?
- The value.
- firstColumn int? = null
- The value.
- lastColumn int? = null
- The value.
public static ExcelSheetPageSetup Scale(ExcelSheetPageSetup excelSheetPageSetup, uint? value) #Sets ExcelSheetPageSetup.Scale: Manual print scale percentage (10-400); null when none is stored.
Parameters
- excelSheetPageSetup OfficeIMO.Excel.ExcelSheetPageSetup
- The instance.
- value uint?
- The value.
Examples
// C# initializer or property // C# fluent
excelSheetPageSetup.Scale = value; excelSheetPageSetup.Scale(value);public static ExcelSheetPageSetup VerticalCentered(ExcelSheetPageSetup excelSheetPageSetup, bool value = true) #Sets ExcelSheetPageSetup.VerticalCentered: Whether the printed sheet is centered vertically on the page.
Parameters
- excelSheetPageSetup OfficeIMO.Excel.ExcelSheetPageSetup
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
excelSheetPageSetup.VerticalCentered = value; excelSheetPageSetup.VerticalCentered(value);