API Reference
WordTableRow
Represents a row within a WordTable and exposes row level operations.
Inheritance
- Object
- WordTableRow
Constructors
public WordTableRow(WordDocument document, WordTable wordTable) #Initializes a new instance of the WordTableRow class and creates an empty row.
Parameters
- document OfficeIMO.Word.WordDocument
- The parent WordDocument.
- wordTable OfficeIMO.Word.WordTable
- The table to which this row belongs.
public WordTableRow(WordTable wordTable, TableRow row, WordDocument document) #Initializes a new instance of the WordTableRow class from an existing TableRow.
Parameters
- wordTable OfficeIMO.Word.WordTable
- The parent WordTable.
- row DocumentFormat.OpenXml.Wordprocessing.TableRow
- The underlying Open XML table row.
- document OfficeIMO.Word.WordDocument
- The parent WordDocument.
Methods
public Void Add(WordTableCell cell) #VoidAppends the specified WordTableCell to the end of this row.
Parameters
- cell OfficeIMO.Word.WordTableCell
- The cell to append.
AddTableRowProperties() #Generate table row properties for the row if it doesn't exists
public List<WordTableCell> GetCells(Boolean readOnly = false) #List<WordTableCell>Returns cells for this row. When readOnly is true, wrappers are created without ensuring tcPr, avoiding DOM mutations on read.
Parameters
- readOnly System.Boolean = false
public Void MergeVertically(Int32 cellIndex, Int32 rowsCount, Boolean copyParagraphs = false) #VoidMerges cells starting from the specified column across subsequent rows.
Parameters
- cellIndex System.Int32
- Column index of the first cell to merge.
- rowsCount System.Int32
- Number of rows below this one to merge.
- copyParagraphs System.Boolean = false
- True to move paragraphs from merged cells to the first cell; false to discard them.
op_Equality(OfficeIMO.Word.WordTableRow left, OfficeIMO.Word.WordTableRow right) #Compares two rows for equality based on the underlying OpenXML row reference.
Parameters
- left OfficeIMO.Word.WordTableRow
- right OfficeIMO.Word.WordTableRow
op_Inequality(OfficeIMO.Word.WordTableRow left, OfficeIMO.Word.WordTableRow right) #Determines whether two rows are not equal.
Parameters
- left OfficeIMO.Word.WordTableRow
- right OfficeIMO.Word.WordTableRow
Inherited Methods
Properties
public List<WordTableCell> Cells { get; } #Return all cells for given row
public WordTableCell FirstCell { get; } #Return first cell for given row
public WordTableCell LastCell { get; } #Return last cell for given row
public Nullable<Int32> Height { get; set; } #Gets or sets height of a row
public Boolean AllowRowToBreakAcrossPages { get; set; } #Gets or sets a value indicating whether the row is allowed to break across pages. When set to false, the row is kept intact on a single page.
RepeatHeaderRowAtTheTopOfEachPage #Gets or sets header row at the top of each page Since this is a table row property, it is not possible to set it for a single row
public WordTable Parent { get; } #Gets the table that owns this row.