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
column |
Gets the number of columns in the matrix data structure, as an integer value. |
row |
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;
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Add-ins