[]
        
(Showing Draft Content)

GC.Spread.Sheets.SheetTabStyleManager

Class: SheetTabStyleManager

Spread.Sheets.SheetTabStyleManager

Table of contents

Constructors

Methods

Constructors

constructor

new SheetTabStyleManager(workbook)

Represents the sheet tab style manager, which can manage the related styles of all sheet tabs.

Parameters

Name Type Description
workbook Workbook The workbook.

Methods

add

add(state, style, sheetNames?): void

Add the status style of some or all sheet tabs in the spreadsheet.

example

spread.sheetTabStyles.add(GC.Spread.Sheets.SheetTabState.active, {foreColor: "red"}, ["Sheet1", "Sheet2"]);
spread.sheetTabStyles.add(GC.Spread.Sheets.SheetTabState.hover, {foreColor: "red"});

Parameters

Name Type Description
state SheetTabState Sheet tab state.
style ISheetTabStyle Sheet tab style.
sheetNames? string[] The array of sheet tab names to style.

Returns

void


all

all(sheetNames?): ISheetNameTabStyleMap

Get the status style of some or all sheet tabs in the spreadsheet.

example

spread.sheetTabStyles.all(["Sheet1", "Sheet2"]);
spread.sheetTabStyles.all();

Parameters

Name Type Description
sheetNames? string[] Array of names of sheet tabs to be queried.

Returns

ISheetNameTabStyleMap

The status style of some or all sheet tabs.


clear

clear(sheetNames?): void

Clear the status styles of some or all sheet tabs in the spreadsheet.

example

spread.sheetTabStyles.clear(["Sheet1", "Sheet2"]);
spread.sheetTabStyles.clear();

Parameters

Name Type Description
sheetNames? string[] The array of worksheet tab names whose status styles need to be cleared.

Returns

void


remove

remove(state, sheetNames?): void

Remove the status style of some or all sheet tabs in the spreadsheet.

example

spread.sheetTabStyles.remove(GC.Spread.Sheets.SheetTabState.active, ["Sheet1", "Sheet2"]);
spread.sheetTabStyles.remove(GC.Spread.Sheets.SheetTabState.hover);

Parameters

Name Type Description
state SheetTabState Sheet tab state.
sheetNames? string[] The worksheet tab name array corresponding to the state style needs to be deleted.

Returns

void