Workbook is the top level object which contains related workbook objects such as worksheets, tables, ranges, etc.
None
Relationship | Type | Description |
---|---|---|
application | Application | Represents Excel application instance that contains this workbook. Read-only. |
bindings | BindingCollection | Represents a collection of bindings that are part of the workbook. Read-only. |
names | NamedItemCollection | Represents a collection of workbook scoped named items (named ranges and constants). Read-only. |
tables | TableCollection | Represents a collection of tables associated with the workbook. Read-only. |
worksheets | WorksheetCollection | Represents a collection of worksheets associated with the workbook. Read-only. |
Method | Return Type | Description |
---|---|---|
getSelectedRange() | Range | Gets the currently selected range from the workbook. |
load(param: object) | void | Fills the proxy object created in JavaScript layer with property and object values specified in the parameter. |
Gets the currently selected range from the workbook.
workbookObject.getSelectedRange();
None
var ctx = new Excel.RequestContext();
var selectedRange = ctx.workbook.getSelectedRange();
ctx.executeAsync().then(function () {
Console.log(selectedRange.address);
});
Fills the proxy object created in JavaScript layer with property and object values specified in the parameter.
object.load(param);
Parameter | Type | Description |
---|---|---|
param | object | Optional. Accepts parameter and relationship names as delimited string or an array. Or, provide loadOption object. |
void