Table of Contents

Method AppendTable

Namespace
DocWright.Dom.Editing
Assembly
DocWright.Dom.dll

AppendTable(WordDocument, int, int, Twips)

Appends a table to the document's last section, creating a section when the document has none.

public static Table AppendTable(this WordDocument document, int rowCount, int columnCount, Twips columnWidth)

Parameters

document WordDocument

The document.

rowCount int

The number of rows.

columnCount int

The number of columns.

columnWidth Twips

The width of every grid column. The table grid is required by the schema, so the width is a parameter rather than an invented default.

Returns

Table

The appended table.

Exceptions

ArgumentNullException

document is null.

ArgumentOutOfRangeException

rowCount or columnCount is negative.

AppendTable(Section, int, int, Twips)

Appends a table to a section.

public static Table AppendTable(this Section section, int rowCount, int columnCount, Twips columnWidth)

Parameters

section Section

The section.

rowCount int

The number of rows.

columnCount int

The number of columns.

columnWidth Twips

The width of every grid column.

Returns

Table

The appended table.

Exceptions

ArgumentNullException

section is null.

ArgumentOutOfRangeException

rowCount or columnCount is negative.

AppendTable(TableCell, int, int, Twips)

Appends a nested table to a table cell.

public static Table AppendTable(this TableCell cell, int rowCount, int columnCount, Twips columnWidth)

Parameters

cell TableCell

The cell.

rowCount int

The number of rows.

columnCount int

The number of columns.

columnWidth Twips

The width of every grid column.

Returns

Table

The appended table.

Exceptions

ArgumentNullException

cell is null.

ArgumentOutOfRangeException

rowCount or columnCount is negative.

AppendTable(HeaderFooter, int, int, Twips)

Appends a table to a header or footer.

public static Table AppendTable(this HeaderFooter part, int rowCount, int columnCount, Twips columnWidth)

Parameters

part HeaderFooter

The header or footer.

rowCount int

The number of rows.

columnCount int

The number of columns.

columnWidth Twips

The width of every grid column.

Returns

Table

The appended table.

Exceptions

ArgumentNullException

part is null.

ArgumentOutOfRangeException

rowCount or columnCount is negative.

AppendTable(Note, int, int, Twips)

Appends a table to a footnote or endnote body.

public static Table AppendTable(this Note note, int rowCount, int columnCount, Twips columnWidth)

Parameters

note Note

The note.

rowCount int

The number of rows.

columnCount int

The number of columns.

columnWidth Twips

The width of every grid column.

Returns

Table

The appended table.

Exceptions

ArgumentNullException

note is null.

ArgumentOutOfRangeException

rowCount or columnCount is negative.