Table of Contents

Class OdfEmbeddedTable

Namespace
OdfKit.Presentation
Assembly
OdfKit.dll

Represents a table embedded inside a drawing frame. 表示嵌入在圖形框架內的表格。

public sealed class OdfEmbeddedTable
Inheritance
OdfEmbeddedTable
Inherited Members

Properties

TemplateName

Gets or sets the table template or theme style name. 取得或設定表格範本/主題樣式名稱。

public string? TemplateName { get; set; }

Property Value

string

Methods

SetCellBackgroundColor(int, int, string?)

Sets the background color of the specified cell. 設定指定儲存格的背景色。

public OdfEmbeddedTable SetCellBackgroundColor(int row, int column, string? color)

Parameters

row int

The zero-based row index. / 採 0 為基準的列索引。

column int

The zero-based column index. / 採 0 為基準的欄索引。

color string

The background color, such as #FFFF00; null or an empty string clears the style value. / 背景色,例如 #FFFF00;傳入 null 或空字串會清除樣式值。

Returns

OdfEmbeddedTable

The current embedded table. / 目前嵌入表格。

SetCellBorder(int, int, string?)

Sets the shared border for all sides of the specified cell. 設定指定儲存格四邊共用的框線。

public OdfEmbeddedTable SetCellBorder(int row, int column, string? border)

Parameters

row int

The zero-based row index. / 採 0 為基準的列索引。

column int

The zero-based column index. / 採 0 為基準的欄索引。

border string

The border value, such as 0.75pt solid #336699; null or an empty string clears the style value. / 框線值,例如 0.75pt solid #336699;傳入 null 或空字串會清除樣式值。

Returns

OdfEmbeddedTable

The current embedded table. / 目前嵌入表格。

SetCellBorderBottom(int, int, string?)

Sets the bottom border of the specified cell. 設定指定儲存格的下框線。

public OdfEmbeddedTable SetCellBorderBottom(int row, int column, string? border)

Parameters

row int

The zero-based row index. / 採 0 為基準的列索引。

column int

The zero-based column index. / 採 0 為基準的欄索引。

border string

The border value, such as 0.75pt solid #336699; null or an empty string clears the style value. / 框線值,例如 0.75pt solid #336699;傳入 null 或空字串會清除樣式值。

Returns

OdfEmbeddedTable

The current embedded table. / 目前嵌入表格。

SetCellBorderLeft(int, int, string?)

Sets the left border of the specified cell. 設定指定儲存格的左框線。

public OdfEmbeddedTable SetCellBorderLeft(int row, int column, string? border)

Parameters

row int

The zero-based row index. / 採 0 為基準的列索引。

column int

The zero-based column index. / 採 0 為基準的欄索引。

border string

The border value, such as 0.75pt solid #336699; null or an empty string clears the style value. / 框線值,例如 0.75pt solid #336699;傳入 null 或空字串會清除樣式值。

Returns

OdfEmbeddedTable

The current embedded table. / 目前嵌入表格。

SetCellBorderRight(int, int, string?)

Sets the right border of the specified cell. 設定指定儲存格的右框線。

public OdfEmbeddedTable SetCellBorderRight(int row, int column, string? border)

Parameters

row int

The zero-based row index. / 採 0 為基準的列索引。

column int

The zero-based column index. / 採 0 為基準的欄索引。

border string

The border value, such as 0.75pt solid #336699; null or an empty string clears the style value. / 框線值,例如 0.75pt solid #336699;傳入 null 或空字串會清除樣式值。

Returns

OdfEmbeddedTable

The current embedded table. / 目前嵌入表格。

SetCellBorderTop(int, int, string?)

Sets the top border of the specified cell. 設定指定儲存格的上框線。

public OdfEmbeddedTable SetCellBorderTop(int row, int column, string? border)

Parameters

row int

The zero-based row index. / 採 0 為基準的列索引。

column int

The zero-based column index. / 採 0 為基準的欄索引。

border string

The border value, such as 0.75pt solid #336699; null or an empty string clears the style value. / 框線值,例如 0.75pt solid #336699;傳入 null 或空字串會清除樣式值。

Returns

OdfEmbeddedTable

The current embedded table. / 目前嵌入表格。

SetCellSpan(int, int, int, int)

Sets the span of the specified cell and converts covered cells to table:covered-table-cell. 設定指定儲存格的合併範圍,並將被覆蓋的格子轉為 table:covered-table-cell

public OdfEmbeddedTable SetCellSpan(int row, int column, int rowSpan, int columnSpan)

Parameters

row int

The zero-based starting row index. / 採 0 為基準的起始列索引。

column int

The zero-based starting column index. / 採 0 為基準的起始欄索引。

rowSpan int

The number of rows to span. / 列合併數。

columnSpan int

The number of columns to span. / 欄合併數。

Returns

OdfEmbeddedTable

The current embedded table. / 目前嵌入表格。

SetCellText(int, int, string)

Sets the text of the specified cell. 設定指定儲存格的文字。

public OdfEmbeddedTable SetCellText(int row, int column, string text)

Parameters

row int

The zero-based row index. / 採 0 為基準的列索引。

column int

The zero-based column index. / 採 0 為基準的欄索引。

text string

The cell text. / 儲存格文字。

Returns

OdfEmbeddedTable

The current embedded table. / 目前嵌入表格。

SetCellTextStyle(int, int)

Short overload of SetCellTextStyle that accepts row and column; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 row 與 column;其餘可選參數使用預設值並轉呼叫最長 SetCellTextStyle 多載。

public OdfEmbeddedTable SetCellTextStyle(int row, int column)

Parameters

row int
column int

Returns

OdfEmbeddedTable

SetCellTextStyle(int, int, bool?)

Short overload of SetCellTextStyle that accepts row, column, and bold; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 row、column 與 bold;其餘可選參數使用預設值並轉呼叫最長 SetCellTextStyle 多載。

public OdfEmbeddedTable SetCellTextStyle(int row, int column, bool? bold)

Parameters

row int
column int
bold bool?

Returns

OdfEmbeddedTable

SetCellTextStyle(int, int, bool?, bool?)

Short overload of SetCellTextStyle that accepts row, column, bold, and italic; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 row、column、bold 與 italic;其餘可選參數使用預設值並轉呼叫最長 SetCellTextStyle 多載。

public OdfEmbeddedTable SetCellTextStyle(int row, int column, bool? bold, bool? italic)

Parameters

row int
column int
bold bool?
italic bool?

Returns

OdfEmbeddedTable

SetCellTextStyle(int, int, bool?, bool?, bool?)

Short overload of SetCellTextStyle that accepts row, column, bold, italic, and underline; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 row、column、bold、italic 與 underline;其餘可選參數使用預設值並轉呼叫最長 SetCellTextStyle 多載。

public OdfEmbeddedTable SetCellTextStyle(int row, int column, bool? bold, bool? italic, bool? underline)

Parameters

row int
column int
bold bool?
italic bool?
underline bool?

Returns

OdfEmbeddedTable

SetCellTextStyle(int, int, bool?, bool?, bool?, bool?)

Short overload of SetCellTextStyle that accepts row, column, bold, italic, underline, and strikethrough; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 row、column、bold、italic、underline 與 strikethrough;其餘可選參數使用預設值並轉呼叫最長 SetCellTextStyle 多載。

public OdfEmbeddedTable SetCellTextStyle(int row, int column, bool? bold, bool? italic, bool? underline, bool? strikethrough)

Parameters

row int
column int
bold bool?
italic bool?
underline bool?
strikethrough bool?

Returns

OdfEmbeddedTable

SetCellTextStyle(int, int, bool?, bool?, bool?, bool?, string?)

Short overload of SetCellTextStyle that accepts row, column, bold, italic, underline, strikethrough, and textPosition; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 row、column、bold、italic、underline、strikethrough 與 textPosition;其餘可選參數使用預設值並轉呼叫最長 SetCellTextStyle 多載。

public OdfEmbeddedTable SetCellTextStyle(int row, int column, bool? bold, bool? italic, bool? underline, bool? strikethrough, string? textPosition)

Parameters

row int
column int
bold bool?
italic bool?
underline bool?
strikethrough bool?
textPosition string

Returns

OdfEmbeddedTable

SetCellTextStyle(int, int, bool?, bool?, bool?, bool?, string?, string?)

Short overload of SetCellTextStyle that accepts row, column, bold, italic, underline, strikethrough, textPosition, and fontSize; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 row、column、bold、italic、underline、strikethrough、textPosition 與 fontSize;其餘可選參數使用預設值並轉呼叫最長 SetCellTextStyle 多載。

public OdfEmbeddedTable SetCellTextStyle(int row, int column, bool? bold, bool? italic, bool? underline, bool? strikethrough, string? textPosition, string? fontSize)

Parameters

row int
column int
bold bool?
italic bool?
underline bool?
strikethrough bool?
textPosition string
fontSize string

Returns

OdfEmbeddedTable

SetCellTextStyle(int, int, bool?, bool?, bool?, bool?, string?, string?, string?)

Sets common text styling for the specified cell. 設定指定儲存格文字的常用樣式。

public OdfEmbeddedTable SetCellTextStyle(int row, int column, bool? bold, bool? italic, bool? underline, bool? strikethrough, string? textPosition, string? fontSize, string? color)

Parameters

row int

The zero-based row index. / 採 0 為基準的列索引。

column int

The zero-based column index. / 採 0 為基準的欄索引。

bold bool?

Whether text is bold; null leaves it unchanged. / 是否為粗體;傳入 null 表示不變更。

italic bool?

Whether text is italic; null leaves it unchanged. / 是否為斜體;傳入 null 表示不變更。

underline bool?

Whether text is underlined; null leaves it unchanged. / 是否加上底線;傳入 null 表示不變更。

strikethrough bool?

Whether text is struck through; null leaves it unchanged. / 是否加上刪除線;傳入 null 表示不變更。

textPosition string

The text position, such as super or sub; null leaves it unchanged. / 文字位置,例如 supersub;傳入 null 表示不變更。

fontSize string

The font size, such as 14pt; null leaves it unchanged. / 字型大小,例如 14pt;傳入 null 表示不變更。

color string

The text color, such as #336699; null leaves it unchanged. / 文字色彩,例如 #336699;傳入 null 表示不變更。

Returns

OdfEmbeddedTable

The current embedded table. / 目前嵌入表格。

SetTemplateName(string?)

Sets the table template or theme style name and returns this embedded table for chaining. 設定表格範本/主題樣式名稱,並傳回目前嵌入表格以便鏈式呼叫。

public OdfEmbeddedTable SetTemplateName(string? templateName)

Parameters

templateName string

The table template name; null or whitespace clears it. / 表格範本名稱;傳入 null 或空白會清除。

Returns

OdfEmbeddedTable

The current embedded table. / 目前嵌入表格。