ExcelRangeScope
OfficeIMO.Excel
Edits one ExcelRange: its fluent methods and keywords, each returning this scope.
Inheritance
- object
- ExcelRangeScope
Usage
Explore 25 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 24
- Method ExcelRangeScope.Baseline
- Method ExcelRangeScope.Bold
- Method ExcelRangeScope.Border
- Method ExcelRangeScope.Cell
- Method ExcelRangeScope.Color
- Method ExcelRangeScope.DiagonalBorder
- Method ExcelRangeScope.FillColor
- Method ExcelRangeScope.FontFamily
- Method ExcelRangeScope.FontSize
- Method ExcelRangeScope.GradientFill
- Method ExcelRangeScope.HorizontalAlignment
- Method ExcelRangeScope.Italic
- Method ExcelRangeScope.NumberFormat
- Method ExcelRangeScope.Sheet
- Method ExcelRangeScope.ShrinkToFit
- Method ExcelRangeScope.Strikethrough
- Method ExcelRangeScope.Subscript
- Method ExcelRangeScope.Superscript
- Method ExcelRangeScope.TextRotation
- Method ExcelRangeScope.Underline
- Method ExcelRangeScope.Values
- Method ExcelRangeScope.VerticalAlignment
- Method ExcelRangeScope.VerticalTextAlignment
- Method ExcelRangeScope.WrapText
Accepted by parameters 1
- Method ExcelSheetScope.Range
Methods
public ExcelRangeScope Baseline() #Restores every cell in the range to the normal baseline.
public ExcelRangeScope Bold(bool bold = true) #Sets or clears bold font style for every cell in the range.
Parameters
- bold bool = true
- The value.
public ExcelRangeScope Border(ExcelBorderStyle style, OfficeColor? color = null) #Applies a border style to every edge of every cell in the range.
Parameters
- style OfficeIMO.Excel.ExcelBorderStyle
- The value.
- color OfficeIMO.OfficeColor? = null
- The value.
public ExcelRangeScope Border(ExcelCellBorders borders, ExcelBorderStyle style, OfficeColor? color = null) #Sets selected border edges of every cell in the range while preserving other edges and styles.
Parameters
- borders OfficeIMO.Excel.ExcelCellBorders
- The value.
- style OfficeIMO.Excel.ExcelBorderStyle
- The value.
- color OfficeIMO.OfficeColor? = null
- The value.
public ExcelRangeScope Cell(int rowOffset, int columnOffset, Action<ExcelCellScope>? configure = null) #Gets an editable cell using one-based offsets from this range's top-left cell.
Parameters
- rowOffset int
- The value.
- columnOffset int
- The value.
- configure System.Action<OfficeIMO.Excel.ExcelCellScope>? = null
- Configures the new item through its scope.
public ExcelRangeScope Color(OfficeColor color) #Applies a font color to every cell in the range.
Parameters
- color OfficeIMO.OfficeColor
- The value.
public ExcelRangeScope DiagonalBorder(ExcelBorderStyle style, OfficeColor? color = null, bool diagonalUp = true, bool diagonalDown = true) #Applies diagonal borders to every cell in the range.
Parameters
- style OfficeIMO.Excel.ExcelBorderStyle
- The value.
- color OfficeIMO.OfficeColor? = null
- The value.
- diagonalUp bool = true
- The value.
- diagonalDown bool = true
- The value.
public ExcelRangeScope FillColor(OfficeColor color) #Applies a solid fill color to every cell in the range. Theme colors stay linked to the workbook theme.
Parameters
- color OfficeIMO.OfficeColor
- The value.
public ExcelRangeScope FontFamily(string fontFamily) #Applies a font family name to every cell in the range.
Parameters
- fontFamily string
- The value.
public ExcelRangeScope FontSize(OfficeLength fontSize) #Applies a positive physical font size to every cell in the range.
Parameters
- fontSize OfficeIMO.OfficeLength
- The value.
public ExcelRangeScope GradientFill(OfficeColor fromColor, OfficeColor toColor, double degree = 0) #Applies a two-color linear gradient fill to every cell in the range.
Parameters
- fromColor OfficeIMO.OfficeColor
- The value.
- toColor OfficeIMO.OfficeColor
- The value.
- degree double = 0
- The value.
public ExcelRangeScope HorizontalAlignment(ExcelHorizontalAlignment alignment) #Sets the horizontal alignment of every cell in the range.
Parameters
- alignment OfficeIMO.Excel.ExcelHorizontalAlignment
- The value.
public ExcelRangeScope Italic(bool italic = true) #Sets or clears italic font style for every cell in the range.
Parameters
- italic bool = true
- The value.
public ExcelRangeScope NumberFormat(string numberFormat) #Applies a number format to every cell in the range.
Parameters
- numberFormat string
- The value.
public ExcelRangeScope Sheet(Action<ExcelSheet> configure) #Configures ExcelRange.Sheet in place: Gets the worksheet that owns the range.
Parameters
- configure System.Action<OfficeIMO.Excel.ExcelSheet>
- Configures the value.
public ExcelRangeScope ShrinkToFit(bool shrinkToFit = true) #Sets or clears shrink-to-fit text alignment for every cell in the range.
Parameters
- shrinkToFit bool = true
- The value.
public ExcelRangeScope Strikethrough(bool strikethrough = true) #Sets or clears strikethrough font style for every cell in the range.
Parameters
- strikethrough bool = true
- The value.
public ExcelRangeScope Subscript() #Formats every cell in the range as subscript.
public ExcelRangeScope Superscript() #Formats every cell in the range as superscript.
public ExcelRangeScope TextRotation(int rotation) #Sets Excel text rotation for every cell in the range.
Parameters
- rotation int
- The value.
public ExcelRangeScope Underline(bool underline = true) #Sets or clears single underline font style for every cell in the range.
Parameters
- underline bool = true
- The value.
public ExcelRangeScope Underline(ExcelUnderlineStyle underlineStyle) #Sets the native Excel underline style for every cell in the range.
Parameters
- underlineStyle OfficeIMO.Excel.ExcelUnderlineStyle
- The value.
public ExcelRangeScope Values(object?[,] values) #Writes a rectangular matrix whose dimensions exactly match this range.
Parameters
- values object?[,]
- The value.
public ExcelRangeScope VerticalAlignment(ExcelVerticalAlignment alignment) #Sets the vertical alignment of every cell in the range.
Parameters
- alignment OfficeIMO.Excel.ExcelVerticalAlignment
- The value.
public ExcelRangeScope VerticalTextAlignment(ExcelVerticalTextAlignment alignment) #Sets the native Excel baseline, superscript, or subscript alignment for every cell in the range.
Parameters
- alignment OfficeIMO.Excel.ExcelVerticalTextAlignment
- The value.
public ExcelRangeScope WrapText(bool wrapText = true) #Sets or clears text wrapping for every cell in the range.
Parameters
- wrapText bool = true
- The value.
Inherited Methods
Properties
public ExcelRange Model { get; } #The ExcelRange this scope edits, for plain C# inside a lambda.