WbkDocument.getActiveSheet

Syntax

getActiveSheet ();

Description

The getActiveSheet method returns active sheet.

Comments

The getActiveSheet method returns an instance of the Workbook class.

Example

To execute the example, create a service for working with time series, get a workbook instance from the time series database (see WbkDocument.ActiveSheetKey) and add the following code in the handler that processes document opening:

	var activeSheet = wbkDocument.getActiveSheet();
	console.log("current sheet, object of the Workbook class");
	console.log(activeSheet);

After executing the example the browser console displays the current sheet: that is, and instance of Workbook class:

current sheet, a Workbook class instance

PP.TS.Workbook {_WbkMetadata: Object, _Events: Object, ChangedSeries: PP.Delegate, WorkbookMdLoaded: PP.Delegate, _SelectedSeries: Array[0]…}

See also:

WbkDocument