API Reference
WordTableBuilder
Builder for tables.
Inheritance
- Object
- WordTableBuilder
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Method WordTableBuilder.Align
- Method WordTableBuilder.Cell
- Method WordTableBuilder.CellStyle
- Method WordTableBuilder.Columns
- Method WordTableBuilder.ColumnStyle
- Method WordTableBuilder.ColumnWidth
- Method WordTableBuilder.ColumnWidthsPercentage
- Method WordTableBuilder.Create
- Method WordTableBuilder.DeleteColumn
- Method WordTableBuilder.DeleteRow
- Method WordTableBuilder.ForEachCell
- Method WordTableBuilder.ForEachCell
- Method WordTableBuilder.From2D
- Method WordTableBuilder.Header
- Method WordTableBuilder.HeaderRow
- Method WordTableBuilder.Headers
- Method WordTableBuilder.InsertColumn
- Method WordTableBuilder.InsertRow
- Method WordTableBuilder.Merge
- Method WordTableBuilder.PreferredWidth
- Method WordTableBuilder.Row
- Method WordTableBuilder.RowHeight
- Method WordTableBuilder.Rows
- Method WordTableBuilder.Rows
- Method WordTableBuilder.Rows
- Method WordTableBuilder.RowStyle
- Method WordTableBuilder.Style
Accepted by parameters
- Method SectionBuilder.Table
- Method WordFluentDocument.Table
Methods
public WordTableBuilder Align(WordTableAlignment alignment) #WordTableBuilderSets horizontal alignment for the table.
Parameters
- alignment OfficeIMO.Word.WordTableAlignment
public WordTableBuilder Cell(Int32 row, Int32 column, Action<WordTableCell> action) #WordTableBuilderPerforms an action on the specified cell using 1-based row and column indices.
Parameters
- row System.Int32
- column System.Int32
- action System.Action{OfficeIMO.Word.WordTableCell}
public WordTableBuilder CellStyle(Int32 row, Int32 column, Action<WordTableCell> action) #WordTableBuilderApplies an action to style a specific cell using 1-based coordinates.
Parameters
- row System.Int32
- column System.Int32
- action System.Action{OfficeIMO.Word.WordTableCell}
public WordTableBuilder Columns(Int32 columns) #WordTableBuilderSets the number of columns for the table.
Parameters
- columns System.Int32
public WordTableBuilder ColumnStyle(Int32 index, Action<WordTableCell> action) #WordTableBuilderApplies an action to each cell in a specified column.
Parameters
- index System.Int32
- action System.Action{OfficeIMO.Word.WordTableCell}
public WordTableBuilder ColumnWidth(Int32 columnIndex, Double widthPoints) #WordTableBuilderSets the width for the specified column in points.
Parameters
- columnIndex System.Int32
- widthPoints System.Double
public WordTableBuilder ColumnWidthsPercentage(params Int32[] percentages) #WordTableBuilderSets column widths using percentage values.
Parameters
- percentages System.Int32[]
public WordTableBuilder Create(Int32 rows, Int32 columns) #WordTableBuilderCreates the table with the specified size.
Parameters
- rows System.Int32
- Number of rows.
- columns System.Int32
- Number of columns.
Returns
The current WordTableBuilder.
public WordTableBuilder DeleteColumn(Int32 index) #WordTableBuilderDeletes the column at the specified 1-based index.
Parameters
- index System.Int32
public WordTableBuilder DeleteRow(Int32 index) #WordTableBuilderDeletes the row at the specified 1-based index.
Parameters
- index System.Int32
public WordTableBuilder ForEachCell(Func<Int32, Int32, String> textFactory) #WordTableBuilderPopulates all cells using the provided text factory.
Parameters
- textFactory System.Func{System.Int32,System.Int32,System.String}
public WordTableBuilder ForEachCell(Action<Int32, Int32, WordTableCell> action) #WordTableBuilderExecutes an action for each cell in the table.
Parameters
- action System.Action{System.Int32,System.Int32,OfficeIMO.Word.WordTableCell}
public WordTableBuilder From2D(Object[] data) #WordTableBuilderCreates the table from a two-dimensional array.
Parameters
- data System.Object[0:,0:]
public WordTableBuilder Header(params Object[] cells) #WordTableBuilderAdds a header row to the table.
Parameters
- cells System.Object[]
public WordTableBuilder HeaderRow(Int32 index) #WordTableBuilderMarks a specified row as the header row.
Parameters
- index System.Int32
public WordTableBuilder Headers(params String[] headers) #WordTableBuilderSets header cells using strings (Markdown parity helper).
Parameters
- headers System.String[]
public WordTableBuilder InsertColumn(Int32 index, params Object[] cells) #WordTableBuilderInserts a column at the specified 1-based index.
Parameters
- index System.Int32
- cells System.Object[]
public WordTableBuilder InsertRow(Int32 index, params Object[] cells) #WordTableBuilderInserts a row at the specified 1-based index.
Parameters
- index System.Int32
- cells System.Object[]
public WordTableBuilder Merge(Int32 fromRow, Int32 fromColumn, Int32 toRow, Int32 toColumn) #WordTableBuilderMerges a rectangular range of cells using 1-based coordinates.
Parameters
- fromRow System.Int32
- fromColumn System.Int32
- toRow System.Int32
- toColumn System.Int32
public WordTableBuilder PreferredWidth(Nullable<Int32> percent = null, Nullable<Int32> points = null) #WordTableBuilderSets the preferred width of the table.
Parameters
- percent System.Nullable{System.Int32} = null
- points System.Nullable{System.Int32} = null
public WordTableBuilder Row(params Object[] cells) #WordTableBuilderAdds a row to the table.
Parameters
- cells System.Object[]
public WordTableBuilder RowHeight(Int32 rowIndex, Double heightPoints) #WordTableBuilderSets the height for the specified row in points.
Parameters
- rowIndex System.Int32
- heightPoints System.Double
public WordTableBuilder Rows(IEnumerable<IReadOnlyList<String>> rows) #WordTableBuilderAdds multiple rows from a sequence of string lists (Markdown parity helper).
Parameters
- rows System.Collections.Generic.IEnumerable{System.Collections.Generic.IReadOnlyList{System.String}}
public WordTableBuilder Rows(IEnumerable<ValueTuple<String, String>> rows) #WordTableBuilderAdds two-column rows from tuples (Markdown parity helper).
Parameters
- rows System.Collections.Generic.IEnumerable{System.ValueTuple{System.String,System.String}}
public WordTableBuilder Rows(IEnumerable<KeyValuePair<String, String>> rows) #WordTableBuilderAdds two-column rows from key/value pairs (Markdown parity helper).
Parameters
- rows System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{System.String,System.String}}
public WordTableBuilder RowStyle(Int32 index, Action<WordTableRow> action) #WordTableBuilderApplies an action to a specified row.
Parameters
- index System.Int32
- action System.Action{OfficeIMO.Word.WordTableRow}
public WordTableBuilder Style(WordTableStyle style) #WordTableBuilderApplies a built-in table style.
Parameters
- style OfficeIMO.Word.WordTableStyle
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public WordTable Table { get; } #Gets the table being built.