OfficeIMO

API Reference

Class

WordTableRow

Namespace OfficeIMO.Word
Assembly OfficeIMO.Word
Implements
IEquatable<WordTableRow>

Represents a row within a WordTable and exposes row level operations.

Inheritance

  • Object
  • WordTableRow

Constructors

WordTableRow 2 overloads
public WordTableRow(WordDocument document, WordTable wordTable) #

Initializes a new instance of the WordTableRow class and creates an empty row.

Parameters

document OfficeIMO.Word.WordDocument requiredposition: 0
The parent WordDocument.
wordTable OfficeIMO.Word.WordTable requiredposition: 1
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 requiredposition: 0
The parent WordTable.
row DocumentFormat.OpenXml.Wordprocessing.TableRow requiredposition: 1
The underlying Open XML table row.
document OfficeIMO.Word.WordDocument requiredposition: 2
The parent WordDocument.

Methods

public Void Add(WordTableCell cell) #
Returns: Void

Appends the specified WordTableCell to the end of this row.

Parameters

cell OfficeIMO.Word.WordTableCell requiredposition: 0
The cell to append.
AddTableRowProperties() #

Generate table row properties for the row if it doesn't exists

Equals 2 overloads
public virtual Boolean Equals(WordTableRow other) #
Returns: Boolean

Determines whether this instance and another row reference the same underlying OpenXML row.

Parameters

other OfficeIMO.Word.WordTableRow requiredposition: 0
public override Boolean Equals(Object obj) #
Returns: Boolean

Parameters

obj System.Object requiredposition: 0
public List<WordTableCell> GetCells(Boolean readOnly = false) #
Returns: 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 optionalposition: 0
public override Int32 GetHashCode() #
Returns: Int32
public Void MergeVertically(Int32 cellIndex, Int32 rowsCount, Boolean copyParagraphs = false) #
Returns: Void

Merges cells starting from the specified column across subsequent rows.

Parameters

cellIndex System.Int32 requiredposition: 0
Column index of the first cell to merge.
rowsCount System.Int32 requiredposition: 1
Number of rows below this one to merge.
copyParagraphs System.Boolean = false optionalposition: 2
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 required
right OfficeIMO.Word.WordTableRow required
op_Inequality(OfficeIMO.Word.WordTableRow left, OfficeIMO.Word.WordTableRow right) #

Determines whether two rows are not equal.

Parameters

left OfficeIMO.Word.WordTableRow required
right OfficeIMO.Word.WordTableRow required
public Void Remove() #
Returns: Void

Remove a row

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 Int32 CellsCount { get; } #

Gets cells count

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.