Office.MatrixBinding interface

Represents a binding in two dimensions of rows and columns.

Extends

Remarks

The MatrixBinding object inherits the id property, type property, getDataAsync method, and setDataAsync method from the Binding object.

Properties

columnCount

Gets the number of columns in the matrix data structure, as an integer value.

rowCount

Gets the number of rows in the matrix data structure, as an integer value.

Property Details

columnCount

Gets the number of columns in the matrix data structure, as an integer value.

columnCount: number;

Property Value

number

Examples

function showBindingColumnCount() {
    Office.context.document.bindings.getByIdAsync("myBinding", function (asyncResult) {
        write("Column: " + asyncResult.value.columnCount);
    });
}
// Function that writes to a div with id='message' on the page.
function write(message){
    document.getElementById('message').innerText += message; 
}

rowCount

Gets the number of rows in the matrix data structure, as an integer value.

rowCount: number;

Property Value

number

Examples

function showBindingRowCount() {
    Office.context.document.bindings.getByIdAsync("myBinding", function (asyncResult) {
        write("Rows: " + asyncResult.value.rowCount);
    });
}
// Function that writes to a div with id='message' on the page.
function write(message){
    document.getElementById('message').innerText += message; 
}