DS Server

TableCellFormat Object

Object|Introduced in 28.0

Description

The TableCellFormat object represents the formatting attributes of a table cell.

Syntax

TableCellFormat

Examples

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

PropertyDescription
bottomBorderThe cell's bottom border.
leftBorderThe cell's left border.
rightBorderThe cell's right border.
topBorderThe cell's top border.

Methods

MethodDescription
getBackColorGets the table cell's background color.
getNumberFormatGets 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.
getTextTypeGets 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.
getVerticalAlignmentGets the vertical alignment of the text in the table cell.
setBackColorSets the table cell's background color.
setNumberFormatSets the table cell's number format.
setTextTypeSets the table cell's text type.
setVerticalAlignmentSets the vertical alignment of the text in the table cell.