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
Methods
SetCellBackgroundColor(int, int, string?)
Sets the background color of the specified cell. 設定指定儲存格的背景色。
public OdfEmbeddedTable SetCellBackgroundColor(int row, int column, string? color)
Parameters
rowintThe zero-based row index. / 採 0 為基準的列索引。
columnintThe zero-based column index. / 採 0 為基準的欄索引。
colorstringThe 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
rowintThe zero-based row index. / 採 0 為基準的列索引。
columnintThe zero-based column index. / 採 0 為基準的欄索引。
borderstringThe 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
rowintThe zero-based row index. / 採 0 為基準的列索引。
columnintThe zero-based column index. / 採 0 為基準的欄索引。
borderstringThe 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
rowintThe zero-based row index. / 採 0 為基準的列索引。
columnintThe zero-based column index. / 採 0 為基準的欄索引。
borderstringThe 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
rowintThe zero-based row index. / 採 0 為基準的列索引。
columnintThe zero-based column index. / 採 0 為基準的欄索引。
borderstringThe 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
rowintThe zero-based row index. / 採 0 為基準的列索引。
columnintThe zero-based column index. / 採 0 為基準的欄索引。
borderstringThe 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
rowintThe zero-based starting row index. / 採 0 為基準的起始列索引。
columnintThe zero-based starting column index. / 採 0 為基準的起始欄索引。
rowSpanintThe number of rows to span. / 列合併數。
columnSpanintThe 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
rowintThe zero-based row index. / 採 0 為基準的列索引。
columnintThe zero-based column index. / 採 0 為基準的欄索引。
textstringThe 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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
rowintcolumnintboldbool?italicbool?underlinebool?strikethroughbool?textPositionstringfontSizestring
Returns
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
rowintThe zero-based row index. / 採 0 為基準的列索引。
columnintThe zero-based column index. / 採 0 為基準的欄索引。
boldbool?Whether text is bold; null leaves it unchanged. / 是否為粗體;傳入 null 表示不變更。
italicbool?Whether text is italic; null leaves it unchanged. / 是否為斜體;傳入 null 表示不變更。
underlinebool?Whether text is underlined; null leaves it unchanged. / 是否加上底線;傳入 null 表示不變更。
strikethroughbool?Whether text is struck through; null leaves it unchanged. / 是否加上刪除線;傳入 null 表示不變更。
textPositionstringThe text position, such as
superorsub; null leaves it unchanged. / 文字位置,例如super或sub;傳入 null 表示不變更。fontSizestringThe font size, such as
14pt; null leaves it unchanged. / 字型大小,例如14pt;傳入 null 表示不變更。colorstringThe 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
Returns
- OdfEmbeddedTable
The current embedded table. / 目前嵌入表格。