Class OdfTable
Represents a table in a text document. 表示文字文件中的表格。
public class OdfTable
- Inheritance
-
OdfTable
- Inherited Members
Constructors
OdfTable(OdfNode, int, int, TextDocument)
public OdfTable(OdfNode node, int rows, int cols, TextDocument doc)
Parameters
nodeOdfNodeThe OdfNode of the table. / 表格的 OdfNode 節點。
rowsintThe table row count. / 表格列數。
colsintThe table column count. / 表格欄數。
docTextDocumentThe owning text document. / 所屬的文字文件。
Methods
AddNestedTable(int, int, int, int)
Adds a nested table within the specified cell. 在指定儲存格中新增巢狀表格。
public OdfTable AddNestedTable(int row, int col, int nestedRows, int nestedCols)
Parameters
rowintThe cell row index. / 儲存格列索引。
colintThe cell column index. / 儲存格欄索引。
nestedRowsintThe nested table row count. / 巢狀表格列數。
nestedColsintThe nested table column count. / 巢狀表格欄數。
Returns
- OdfTable
The created nested table object. / 建立的巢狀表格物件。
DeleteColumns(int)
Short overload of DeleteColumns that accepts position; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 position;其餘可選參數使用預設值並轉呼叫最長 DeleteColumns 多載。
public void DeleteColumns(int position)
Parameters
positionint
DeleteColumns(int, int)
Deletes columns at the specified position; records a table:deletion if change tracking is enabled.
刪除指定位置的欄;若啟用追蹤修訂則記錄 table:deletion。
public void DeleteColumns(int position, int count)
Parameters
positionintThe zero-based start column index. / 以 0 為基準的起始欄索引。
countintThe number of columns to delete. / 要刪除的欄數。
DeleteRows(int)
Short overload of DeleteRows that accepts position; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 position;其餘可選參數使用預設值並轉呼叫最長 DeleteRows 多載。
public void DeleteRows(int position)
Parameters
positionint
DeleteRows(int, int)
Deletes rows at the specified position; records a table:deletion if change tracking is enabled.
刪除指定位置的列;若啟用追蹤修訂則記錄 table:deletion。
public void DeleteRows(int position, int count)
Parameters
positionintThe zero-based start row index. / 以 0 為基準的起始列索引。
countintThe number of rows to delete. / 要刪除的列數。
GetCell(int, int)
Gets the specified cell object. 取得指定的儲存格物件。
public OdfTableCell GetCell(int row, int col)
Parameters
Returns
- OdfTableCell
The corresponding cell instance. / 對應的儲存格執行個體。
InsertColumns(int)
Short overload of InsertColumns that accepts position; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 position;其餘可選參數使用預設值並轉呼叫最長 InsertColumns 多載。
public void InsertColumns(int position)
Parameters
positionint
InsertColumns(int, int)
Inserts columns at the specified position; records a table:insertion if change tracking is enabled.
於指定位置插入欄;若啟用追蹤修訂則記錄 table:insertion。
public void InsertColumns(int position, int count)
Parameters
positionintThe zero-based insertion column index. / 以 0 為基準的插入欄索引。
countintThe number of columns to insert. / 要插入的欄數。
InsertRows(int)
Short overload of InsertRows that accepts position; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 position;其餘可選參數使用預設值並轉呼叫最長 InsertRows 多載。
public void InsertRows(int position)
Parameters
positionint
InsertRows(int, int)
Inserts rows at the specified position; records a table:insertion if change tracking is enabled.
於指定位置插入列;若啟用追蹤修訂則記錄 table:insertion。
public void InsertRows(int position, int count)
Parameters
positionintThe zero-based insertion row index. / 以 0 為基準的插入列索引。
countintThe number of rows to insert. / 要插入的列數。
MergeCells(int, int, int, int)
Merges cells in the table. 合併表格中的儲存格。
public void MergeCells(int startRow, int startCol, int rowSpan, int colSpan)
Parameters
startRowintThe start row index. / 起始列索引。
startColintThe start column index. / 起始欄索引。
rowSpanintThe number of rows spanned. / 橫跨的列數。
colSpanintThe number of columns spanned. / 橫跨的欄數。
SetCellStyle(int, int, string)
Sets the style name of the specified cell. 設定指定儲存格的樣式名稱。
public void SetCellStyle(int row, int col, string styleName)
Parameters
rowintThe cell row index. / 儲存格列索引。
colintThe cell column index. / 儲存格欄索引。
styleNamestringThe style name. / 樣式名稱。
SetColumnWidth(int, OdfLength)
Sets the width of the specified column. 設定指定欄的欄寬。
public void SetColumnWidth(int col, OdfLength width)
Parameters
SetRowRepeat(int, int)
Sets the repeat count of the specified row. 設定指定列的重複次數。
public void SetRowRepeat(int row, int repeatCount)