Class OdfTextTableCollection
Adds text tables to text documents. 提供表格新增入口。
public sealed class OdfTextTableCollection : IEnumerable<OdfTextTableInfo>, IEnumerable
- Inheritance
-
OdfTextTableCollection
- Implements
- Inherited Members
Constructors
OdfTextTableCollection(TextDocument)
Initializes a new instance of the OdfTextTableCollection class. 初始化 OdfTextTableCollection 類別的新執行個體。
public OdfTextTableCollection(TextDocument document)
Parameters
documentTextDocumentThe owning text document. / 所屬文字文件。
Properties
Items
Gets a summary list of the top-level text tables in the document body. 取得文件本文最上層文字表格摘要清單。
public IReadOnlyList<OdfTextTableInfo> Items { get; }
Property Value
Methods
Add(int, int)
Adds a text table to the collection. 新增表格。
public OdfTable Add(int rows, int columns)
Parameters
Returns
- OdfTable
The newly added table. / 新增完成的表格。
Clear()
Removes all top-level text tables while preserving other body content. 移除所有最上層文字表格,並保留其他本文內容。
public void Clear()
Find(string)
Finds the first top-level table with the specified name. 查找第一個具有指定名稱的最上層表格。
public OdfTextTableInfo? Find(string name)
Parameters
namestringThe table name. / 表格名稱。
Returns
- OdfTextTableInfo
The matching table information, or null when no match exists. / 符合的表格資訊;若找不到則為 null。
GetEnumerator()
Gets an enumerator over the text table summaries, for use with LINQ queries. 取得文字表格摘要列舉器,供 LINQ 查詢使用。
public IEnumerator<OdfTextTableInfo> GetEnumerator()
Returns
- IEnumerator<OdfTextTableInfo>
The text table summary enumerator. / 文字表格摘要列舉器。
Remove(OdfTextTableInfo)
Removes the specified top-level text table. 移除指定的最上層文字表格。
public bool Remove(OdfTextTableInfo table)
Parameters
tableOdfTextTableInfoThe table information to remove. / 要移除的表格資訊。