TableCellFormat Object
Description
The TableCellFormat object represents the formatting attributes of a table cell.
Syntax
TableCellFormatExamples
The following example demonstrates TableCellFormat in a practical document-editing workflow. The TableCellFormat object represents the formatting attributes of a table cell.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectTableCellFormat(tableCellFormat) {
tableCellFormat.getBackColor(
function(result) {
console.log("get back color result:", result);
},
onTxError
);
}Members
Properties
| Property | Description |
|---|---|
| bottomBorder | The cell's bottom border. |
| leftBorder | The cell's left border. |
| rightBorder | The cell's right border. |
| topBorder | The cell's top border. |
Methods
| Method | Description |
|---|---|
| getBackColor | Gets the table cell's background color. |
| getNumberFormat | Gets a number format for the table cell. The number format is used, when a formula is defined and the table cell's text is automatically calculated. When a number format is not defined, the property's value is an empty string. The number format string has a format as described in Office Open XML File Formats - ISO/IEC 29500 - 1, Chapter: 18.8.31 Number Formats. |
| getTextType | Gets the text type of the table cell which determines whether the cell's text is interpreted as a number or as text When the type is Text, the cell's text is interpreted as text and it is displayed as it is. When the type is Number, the cell's text is interpreted as a number. The period character (.) is defined as decimal separator, the comma character (,) is defined as thousands separator. |
| getVerticalAlignment | Gets the vertical alignment of the text in the table cell. |
| setBackColor | Sets the table cell's background color. |
| setNumberFormat | Sets the table cell's number format. |
| setTextType | Sets the table cell's text type. |
| setVerticalAlignment | Sets the vertical alignment of the text in the table cell. |