Skip to content

Latest commit

 

History

History
73 lines (53 loc) · 2.13 KB

workbook.md

File metadata and controls

73 lines (53 loc) · 2.13 KB

Workbook

Workbook is the top level object which contains related workbook objects such as worksheets, tables, ranges, etc.

Properties

None

Relationships

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.

Methods

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.

API Specification

getSelectedRange()

Gets the currently selected range from the workbook.

Syntax

workbookObject.getSelectedRange();

Parameters

None

Returns

Range

Examples

var ctx = new Excel.RequestContext();
var selectedRange = ctx.workbook.getSelectedRange();
ctx.executeAsync().then(function () {
		Console.log(selectedRange.address);
});

Back

load(param: object)

Fills the proxy object created in JavaScript layer with property and object values specified in the parameter.

Syntax

object.load(param);

Parameters

Parameter Type Description
param object Optional. Accepts parameter and relationship names as delimited string or an array. Or, provide loadOption object.

Returns

void

Examples

Back