WordTableCell
OfficeIMO.Word
Represents a single cell within a WordTable.
Inheritance
- object
- WordTableCell
Usage
Explore 18 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 8
- Property WordCellComment.Cell
- Method WordTable.InsertColumn
- Property WordTable.Cells
- Method WordTableRow.AddCell
- Method WordTableRow.GetCells
- Property WordTableRow.Cells
- Property WordTableRow.FirstCell
- Property WordTableRow.LastCell
Accepted by parameters 10
- Constructor WordCellComment.WordCellComment
- Method WordPaperStyle.ApplyCellTone
- Method WordPaperStyle.ApplySpacerCell
- Method WordPaperStyle.ApplyValueCard
- Method WordPaperStyle.SetCellText
- Method WordTableCell.Equals
- Method WordTableCell.op_Equality
- Method WordTableCell.op_Equality
- Method WordTableCell.op_Inequality
- Method WordTableCell.op_Inequality
Methods
public WordList AddList(WordListStyle style) #Creates a list within this table cell using the specified style.
Parameters
- style OfficeIMO.Word.WordListStyle
- List style to apply.
public WordParagraph AddParagraph(WordParagraph? paragraph = null, bool removeExistingParagraphs = false) #Add paragraph to the table cell
Parameters
- paragraph OfficeIMO.Word.WordParagraph? = null
- The paragraph to add to this cell, if omitted, a new empty paragraph is appended.
- removeExistingParagraphs bool = false
- If value is not passed or false then add the given paragraph into the cell. If set to true then clear every existing paragraph before adding the new paragraph.
public WordParagraph AddParagraph(string text, bool removeExistingParagraphs = false) #Add paragraph to the table cell with text
Parameters
- text string
- removeExistingParagraphs bool = false
Returns
WordParagraphpublic WordTable AddTable(int rows, int columns, WordTableStyle tableStyle = TableGrid, bool removePrecedingParagraph = false) #Add table to a table cell (nested table)
Parameters
- rows int
- columns int
- tableStyle OfficeIMO.Word.WordTableStyle = TableGrid
- removePrecedingParagraph bool = false
Returns
WordTablepublic bool Equals(WordTableCell? other) #Determines whether this instance and another cell reference the same underlying OpenXML cell.
Parameters
- other OfficeIMO.Word.WordTableCell?
Returns
boolpublic override bool Equals(object? obj) #Determines whether the specified object is equal to the current object.
Parameters
- obj object?
- The object to compare with the current object.
Returns
bool true if the specified object is equal to the current object; otherwise, false.public override int GetHashCode() #Serves as the default hash function.
Returns
int A hash code for the current object.public void MergeHorizontally(int cellsCount, bool copyParagraphs = false) #Merges this cell with the specified number of following logical cells.
Parameters
- cellsCount int
- Number of additional cells to merge after this cell.
- copyParagraphs bool = false
- Moves merged cells' paragraphs into this cell when true; otherwise clears them.
public void MergeVertically(int cellsCount, bool copyParagraphs = false) #Merges this cell with cells at the same logical index in the specified following rows.
Parameters
- cellsCount int
- Number of additional rows to merge below this cell.
- copyParagraphs bool = false
- Moves merged cells' paragraphs into this cell when true; otherwise clears them.
public static bool op_Equality(WordTableCell? left, WordTableCell? right) #Compares two cells for equality based on the underlying OpenXML cell reference.
Parameters
- left OfficeIMO.Word.WordTableCell?
- right OfficeIMO.Word.WordTableCell?
Returns
boolpublic static bool op_Inequality(WordTableCell? left, WordTableCell? right) #Determines whether two cells are not equal.
Parameters
- left OfficeIMO.Word.WordTableCell?
- right OfficeIMO.Word.WordTableCell?
Returns
boolpublic void SplitHorizontally(int cellsCount) #Removes horizontal merge declarations from this cell and the specified following logical cells.
Parameters
- cellsCount int
- Number of additional cells to split after this cell.
public void SplitVertically(int cellsCount) #Removes vertical merge declarations from this cell and cells at the same logical index below it.
Parameters
- cellsCount int
- Number of additional rows to split below this cell.
Inherited Methods
Properties
public WordTableCellBorder Borders { get; } #Provides access to the border configuration of the cell.
public List<WordParagraph> Paragraphs { get; } #Gets all WordParagraph instances contained in the cell.
public List<WordElement> Elements { get; } #Gets the direct child elements contained in the cell in document order.
public WordCellMerge? HorizontalMerge { get; set; } #Gets or Sets Horizontal Merge for a Table Cell
public WordCellMerge? VerticalMerge { get; set; } #Gets or Sets Vertical Merge for a Table Cell
public bool HasHorizontalMerge { get; } #Gets information whether the cell is part of a horizontal merge
public bool HasVerticalMerge { get; } #Gets information whether the cell is part of a vertical merge
public int ColumnSpan { get; } #Gets the number of logical columns occupied by this cell.
public int RowSpan { get; } #Gets the number of logical rows occupied by this cell.
public WordShadingPattern? ShadingPattern { get; set; } #Get or set the background pattern of a cell
public OfficeColor? ShadingFillColor { get; set; } #Gets the resolved background color. Setting a role retains native theme slots and resolves status colors against the document. An automatic or unspecified fill returns null; setting null removes the shading.
public WordTableWidth? Width { get; set; } #Gets or sets the directly authored preferred cell width. Null removes tcW.
public WordTextDirection? TextDirection { get; set; } #Gets or sets text direction in a Table Cell
public WordTableVerticalAlignment? VerticalAlignment { get; set; } #Gets or sets cell vertical alignment in a Table Cell
public OfficeLength? MarginTop { get; set; } #Gets or sets the top margin as a physical length for the current cell.
public OfficeLength? MarginBottom { get; set; } #Gets or sets the bottom margin as a physical length for the current cell.
public OfficeLength? MarginLeft { get; set; } #Gets or sets the left margin as a physical length for the current cell.
public OfficeLength? MarginRight { get; set; } #Gets or sets the right margin as a physical length for the current cell.
public bool HasNestedTables { get; } #Gets information whether the cell contains other nested tables
public bool WrapText { get; set; } #Gets or sets whether text wraps within the cell.
public bool FitText { get; set; } #Gets or sets whether text is compressed to fit within the cell width.
public bool HideMark { get; set; } #Gets or sets whether the empty cell mark is hidden for this cell.