Office.MatrixBinding interface

Represents a binding in two dimensions of rows and columns.

Extends
Binding

Remarks

Requirement SetsMatrixBindings

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

Support details

A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this interface.

For more information about Office host application and server requirements, see Requirements for running Office Add-ins.

Supported hosts, by platform

Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Word Y Y Y

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
Remarks

HostsAccess, Excel, PowerPoint, Project, Word
Requirement SetsMatrixBindings

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
Remarks

HostsAccess, Excel, PowerPoint, Project, Word
Requirement SetsMatrixBindings

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; 
}