Get Started
Documentation

SetThemeColors

SetThemeColors(sTheme) → { bool }

Set the theme colors to the current spreadsheet.

Parameters:

Name Type Description
sTheme string

The list of theme colors that will be used to select the color scheme to be set to the current spreadsheet.

Returns:

Type
bool

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
themes = Api.GetThemesColors();
for (i = 0; i < themes.length; ++i) {
  oWorksheet.GetRange("A" + (i + 1)).SetValue(themes[i]);
}
Api.SetThemeColors(themes[3]);
builder.SaveFile("xlsx", "SetThemeColors.xlsx");
builder.CloseFile();

Resulting document