跳到主要内容

ApiTableCell

表示表格单元格的类。

方法​

下表列出了可用的方法。

方法返回值描述
AddColumnsApiTable | null向当前表格添加新列。
AddRowsApiTable | null向当前表格添加新行。
AddTextApiRun将文本追加到单元格内容的末尾。
Clearboolean清除当前单元格的内容。
GetBackgroundColorApiColor | null返回当前表格单元格的背景颜色。
GetClassType"tableCell"返回 ApiTableCell 类的类型。
GetContentApiDocumentContent返回当前单元格的内容。
GetIndexNumber返回当前单元格的索引。
GetInternalIdstring返回当前表格单元格的内部 ID。
GetNextApiTableCell | null返回下一个单元格(如果存在)。
GetParentRowApiTableRow | null返回当前单元格的父行。
GetParentTableApiTable | null返回当前单元格的父表格。
GetPreviousApiTableCell | null返回上一个单元格(如果存在)。
GetRowIndexnumber | null返回父行的索引。
GetTextstring返回当前表格单元格的内部文本。
RemoveColumnboolean删除包含当前单元格的列。
RemoveRowboolean删除包含当前单元格的行。
Selectboolean选择当前表格单元格。
SetBackgroundColorboolean设置当前单元格的背景颜色。
SetCellBorderBottomboolean设置应在当前表格单元格底部显示的边框。
SetCellBorderLeftboolean设置应在当前表格单元格左侧显示的边框。
SetCellBorderRightboolean设置应在当前表格单元格右侧显示的边框。
SetCellBorderTopboolean设置应在当前表格单元格顶部显示的边框。
SetCellMarginBottomboolean指定表格中特定单元格的单元格内容底部与边框之间应保留的空间量。
SetCellMarginLeftboolean指定表格中特定单元格的当前单元格内容左侧与左边框之间应保留的空间量。
SetCellMarginRightboolean指定表格中特定单元格的当前单元格内容右侧与右边框之间应保留的空间量。
SetCellMarginTopboolean指定表格中特定单元格的当前单元格内容顶部与顶部边框之间应保留的空间量。
SetColumnBackgroundColorboolean为包含当前单元格的列中的所有单元格设置背景颜色。
SetShdboolean指定应应用于当前表格单元格范围的底纹。
SetTextApiRun用指定文本替换当前表格单元格的所有内容,保留第一个段落的格式。
SetTextDirectionboolean指定当前表格单元格的文本流动方向。
SetTextPrboolean为当前单元格的内容设置文本属性。
SetVerticalAlignboolean指定当前表格单元格内文本的垂直对齐方式。
SetWidthboolean指定此单元格的首选宽度。