GetName
Returns the name of the theme.
Syntax
expression.GetName();
expression - A variable that represents a ApiTheme class.
Parameters
This method doesn't have any parameters.
Returns
string
Example
This example shows how to get the name of the current workbook theme.
- Code
- Result
const workbook = Api.GetActiveWorkbook();
const theme = workbook.GetTheme();
const themeName = theme.GetName();
const worksheet = Api.GetActiveSheet();
worksheet.GetRange('A1').SetValue('Theme name: ' + themeName);