WbkDocument.checkSheetName

Syntax

checkSheetName (newSheetName);

Parameters

newSheetName. Sets sheet name.

Description

The checkSheetName method checks if a new sheet name is valid.

Comments

The checkSheetName method checks if the names are unique, to avoid coinciding names. The check ignores space characters at the beginning and the end of the word, and there are no restrictions for the characters included into a sheet name. This method returns True if the check is sucsessful.

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 isAcceptable = wbkDocument.checkSheetName("Sheet 2");
	console.log("acceptability of new sheet name");
	console.log(isAcceptable);

After executing the example the browser console displays result of the checking:

Validity of new sheet name

true

See also:

WbkDocument