跳到主要内容

AddText

将文本追加到单元格内容的末尾。

语法

expression.AddText(text);

expression - 表示 ApiTableCell 类的变量。

参数

名称必需/可选数据类型默认值描述
text必需string要追加的文本。

返回值

ApiRun

示例

// How do I add text to a table cell in a document?

// Insert a sentence into the last paragraph of a cell to populate a table in a document.

let doc = Api.GetDocument();
let table = Api.CreateTable(2, 2);
doc.Push(table);
let cell = table.Cells[0][0];
cell.AddText("Cell content.");