ExcelCellScope
OfficeIMO.Excel
Edits one ExcelCell: its fluent methods and keywords, each returning this scope.
Inheritance
- object
- ExcelCellScope
Usage
Explore 27 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 25
- Method ExcelCellScope.Baseline
- Method ExcelCellScope.Bold
- Method ExcelCellScope.Border
- Method ExcelCellScope.Color
- Method ExcelCellScope.DiagonalBorder
- Method ExcelCellScope.Error
- Method ExcelCellScope.FillColor
- Method ExcelCellScope.FontFamily
- Method ExcelCellScope.FontSize
- Method ExcelCellScope.Formula
- Method ExcelCellScope.GradientFill
- Method ExcelCellScope.HorizontalAlignment
- Method ExcelCellScope.Italic
- Method ExcelCellScope.NumberFormat
- Method ExcelCellScope.RichText
- Method ExcelCellScope.ShrinkToFit
- Method ExcelCellScope.Strikethrough
- Method ExcelCellScope.Subscript
- Method ExcelCellScope.Superscript
- Method ExcelCellScope.TextRotation
- Method ExcelCellScope.Underline
- Method ExcelCellScope.Value
- Method ExcelCellScope.VerticalAlignment
- Method ExcelCellScope.VerticalTextAlignment
- Method ExcelCellScope.WrapText
Accepted by parameters 2
- Method ExcelRangeScope.Cell
- Method ExcelSheetScope.Cell
Methods
public ExcelCellScope Baseline() #Restores the cell text to the normal baseline.
public ExcelCellScope Bold(bool bold = true) #Sets or clears bold font style.
Parameters
- bold bool = true
- The value.
public ExcelCellScope Border(ExcelBorderStyle style, OfficeColor? color = null) #Applies a border style to the cell.
Parameters
- style OfficeIMO.Excel.ExcelBorderStyle
- The value.
- color OfficeIMO.OfficeColor? = null
- The value.
public ExcelCellScope Border(ExcelCellBorders borders, ExcelBorderStyle style, OfficeColor? color = null) #Sets selected border edges while preserving other edges and cell styles.
Parameters
- borders OfficeIMO.Excel.ExcelCellBorders
- The value.
- style OfficeIMO.Excel.ExcelBorderStyle
- The value.
- color OfficeIMO.OfficeColor? = null
- The value.
public ExcelCellScope Color(OfficeColor color) #Sets the font color using a hex color value.
Parameters
- color OfficeIMO.OfficeColor
- The value.
public ExcelCellScope DiagonalBorder(ExcelBorderStyle style, OfficeColor? color = null, bool diagonalUp = true, bool diagonalDown = true) #Applies diagonal borders to the cell.
Parameters
- style OfficeIMO.Excel.ExcelBorderStyle
- The value.
- color OfficeIMO.OfficeColor? = null
- The value.
- diagonalUp bool = true
- The value.
- diagonalDown bool = true
- The value.
public ExcelCellScope Error(string errorText) #Writes a native Excel error value, such as #N/A or #DIV/0!.
Parameters
- errorText string
- The value.
public ExcelCellScope FillColor(OfficeColor color) #Sets the solid fill color. Theme colors stay linked to the workbook theme.
Parameters
- color OfficeIMO.OfficeColor
- The value.
public ExcelCellScope FontFamily(string fontFamily) #Sets the font family name.
Parameters
- fontFamily string
- The value.
public ExcelCellScope FontSize(OfficeLength fontSize) #Sets a positive physical font size.
Parameters
- fontSize OfficeIMO.OfficeLength
- The value.
public ExcelCellScope Formula(string formula) #Sets the cell formula while keeping any existing value as its cached result. This is not a redaction API: rebuild the workbook from approved data to remove sensitive historic content.
Parameters
- formula string
- The value.
public ExcelCellScope GradientFill(OfficeColor fromColor, OfficeColor toColor, double degree = 0) #Sets a two-color linear gradient fill using literal or theme colors.
Parameters
- fromColor OfficeIMO.OfficeColor
- The value.
- toColor OfficeIMO.OfficeColor
- The value.
- degree double = 0
- The value.
public ExcelCellScope HorizontalAlignment(ExcelHorizontalAlignment alignment) #Sets the horizontal alignment.
Parameters
- alignment OfficeIMO.Excel.ExcelHorizontalAlignment
- The value.
public ExcelCellScope Italic(bool italic = true) #Sets or clears italic font style.
Parameters
- italic bool = true
- The value.
public ExcelCellScope NumberFormat(string numberFormat) #Applies a number format to the cell.
Parameters
- numberFormat string
- The value.
public ExcelCellScope RichText(params ExcelRichTextRun[] runs) #Replaces the cell contents with rich inline text runs.
Parameters
- runs OfficeIMO.Excel.ExcelRichTextRun[]
- The value.
public ExcelCellScope RichText(IEnumerable<ExcelRichTextRun> runs) #Replaces the cell contents with rich inline text runs.
Parameters
- runs System.Collections.Generic.IEnumerable<OfficeIMO.Excel.ExcelRichTextRun>
- The value.
public ExcelCellScope ShrinkToFit(bool shrinkToFit = true) #Sets or clears shrink-to-fit text alignment.
Parameters
- shrinkToFit bool = true
- The value.
public ExcelCellScope Strikethrough(bool strikethrough = true) #Sets or clears strikethrough font style.
Parameters
- strikethrough bool = true
- The value.
public ExcelCellScope Subscript() #Formats the cell text as subscript.
public ExcelCellScope Superscript() #Formats the cell text as superscript.
public ExcelCellScope TextRotation(int rotation) #Sets Excel text rotation. Use 0-90 for upward rotation, 91-180 for downward rotation, or 255 for stacked vertical text.
Parameters
- rotation int
- The value.
public ExcelCellScope Underline(bool underline = true) #Sets or clears underline font style.
Parameters
- underline bool = true
- The value.
public ExcelCellScope Underline(ExcelUnderlineStyle underlineStyle) #Sets the native Excel underline style.
Parameters
- underlineStyle OfficeIMO.Excel.ExcelUnderlineStyle
- The value.
public ExcelCellScope Value(object? value) #Sets the cell value, inferring the stored type. Dates and times get a date or duration number format unless the cell already has one.
Parameters
- value object?
- The value.
public ExcelCellScope Value(bool value = true) #Sets Value.
Parameters
- value bool = true
- The value. True when omitted.
public ExcelCellScope Value(DateTimeOffset value) #Sets Value.
Parameters
- value System.DateTimeOffset
- The value.
public ExcelCellScope VerticalAlignment(ExcelVerticalAlignment alignment) #Sets the vertical alignment.
Parameters
- alignment OfficeIMO.Excel.ExcelVerticalAlignment
- The value.
public ExcelCellScope VerticalTextAlignment(ExcelVerticalTextAlignment alignment) #Sets the native Excel baseline, superscript, or subscript alignment.
Parameters
- alignment OfficeIMO.Excel.ExcelVerticalTextAlignment
- The value.
public ExcelCellScope WrapText(bool wrapText = true) #Sets or clears text wrapping.
Parameters
- wrapText bool = true
- The value.