Class WorksheetPropertiesExtensions
Provides extension methods for managing worksheet display properties and settings.
public static class WorksheetPropertiesExtensions
- Inheritance
-
WorksheetPropertiesExtensions
- Inherited Members
Methods
SetDefaultColumnWidth(Worksheet, double)
Sets the default column width for the worksheet.
public static Worksheet SetDefaultColumnWidth(this Worksheet worksheet, double width)
Parameters
Returns
- Worksheet
The worksheet for method chaining.
Exceptions
- ArgumentNullException
Thrown when worksheet is null.
- ArgumentOutOfRangeException
Thrown when width is not positive.
SetDefaultRowHeight(Worksheet, double)
Sets the default row height for the worksheet.
public static Worksheet SetDefaultRowHeight(this Worksheet worksheet, double height)
Parameters
Returns
- Worksheet
The worksheet for method chaining.
Exceptions
- ArgumentNullException
Thrown when worksheet is null.
- ArgumentOutOfRangeException
Thrown when height is not positive.
SetRightToLeft(Worksheet, bool)
Sets whether the worksheet is displayed right-to-left.
public static Worksheet SetRightToLeft(this Worksheet worksheet, bool rightToLeft)
Parameters
worksheet
WorksheetThe worksheet.
rightToLeft
boolTrue for right-to-left display; false for left-to-right display.
Returns
- Worksheet
The worksheet for method chaining.
Exceptions
- ArgumentNullException
Thrown when worksheet is null.
SetZoom(Worksheet, int)
Sets the zoom level for the worksheet view.
public static Worksheet SetZoom(this Worksheet worksheet, int zoomPercentage)
Parameters
Returns
- Worksheet
The worksheet for method chaining.
Exceptions
- ArgumentNullException
Thrown when worksheet is null.
- ArgumentOutOfRangeException
Thrown when zoomPercentage is out of valid range (10-400).
ShowFormulas(Worksheet, bool)
Sets whether to show or hide formulas in the worksheet.
public static Worksheet ShowFormulas(this Worksheet worksheet, bool show)
Parameters
Returns
- Worksheet
The worksheet for method chaining.
Exceptions
- ArgumentNullException
Thrown when worksheet is null.
ShowGridlines(Worksheet, bool)
Sets whether to show or hide gridlines in the worksheet.
public static Worksheet ShowGridlines(this Worksheet worksheet, bool show)
Parameters
Returns
- Worksheet
The worksheet for method chaining.
Exceptions
- ArgumentNullException
Thrown when worksheet is null.
ShowRowColumnHeaders(Worksheet, bool)
Sets whether to show or hide row and column headers in the worksheet.
public static Worksheet ShowRowColumnHeaders(this Worksheet worksheet, bool show)
Parameters
Returns
- Worksheet
The worksheet for method chaining.
Exceptions
- ArgumentNullException
Thrown when worksheet is null.
ShowZeroValues(Worksheet, bool)
Sets whether to show or hide zero values in the worksheet.
public static Worksheet ShowZeroValues(this Worksheet worksheet, bool show)
Parameters
Returns
- Worksheet
The worksheet for method chaining.
Exceptions
- ArgumentNullException
Thrown when worksheet is null.