Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

WordTableBuilder

OfficeIMO.Word

Namespace
OfficeIMO.Word
Assembly
OfficeIMO.Word
Source revision
22fb5b2be3d2 with working tree changes
Modifiers
sealed

Collects the header and rows of a table, so the Table(t => ...) keyword can create the table at its final size and then configure each cell through its scope.

Inheritance

  • object
  • WordTableBuilder

Usage

Explore 10 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.

Accepted by parameters 5

Methods

public WordTableBuilder Columns(int count) #

Sets the minimum number of columns. The table is as wide as this or its widest row, whichever is more.

Parameters

count int required
Minimum number of columns, at least one.

Returns

WordTableBuilder The same builder.
public WordTableBuilder Configure(Action<WordTableScope> configure) #

Configures the created table after its cells are filled: width, borders, alignment, title.

Parameters

configure System.Action<OfficeIMO.Word.WordTableScope> required
Edits the table through its scope.

Returns

WordTableBuilder The same builder.
Header 2 overloads
public WordTableBuilder Header(params string[] cells) #

Sets the header row, which repeats at the top of each page and gets the style's first-row formatting.

Parameters

cells string[] required
Header texts, one per column.

Returns

WordTableBuilder The same builder.
public WordTableBuilder Header(Action<WordTableRowBuilder> row) #

Sets the header row, with a scope for each header cell.

Parameters

row System.Action<OfficeIMO.Word.WordTableRowBuilder> required
Adds the header cells.

Returns

WordTableBuilder The same builder.
Row 2 overloads
public WordTableBuilder Row(params string[] cells) #

Adds a row of plain texts.

Parameters

cells string[] required
Cell texts, one per column.

Returns

WordTableBuilder The same builder.
public WordTableBuilder Row(Action<WordTableRowBuilder> row) #

Adds a row whose cells are configured through their scopes.

Parameters

row System.Action<OfficeIMO.Word.WordTableRowBuilder> required
Adds the row's cells.

Returns

WordTableBuilder The same builder.
public WordTableBuilder Style(WordTableStyle style) #

Sets the table style.

Parameters

style OfficeIMO.Word.WordTableStyle required
Built-in table style.

Returns

WordTableBuilder The same builder.