EssSetStyle

Description

Sets styles information.

Syntax

EssSetStyle([workbookName]sheetName, styleType, dimName, item, newValue)

Where [workbookName]sheetname is the text name of the workbook and worksheet to perform the action.

styleType specifies the style setting you want to set, as shown in Table 36.

Table 36. styleType Values and Settings

styleTypeStyle Setting

0

Dimensions

1

Child Members

2

Parent Members

3

Shared Members

4

Read Only

5

Read/Write

6

Contains Formula

7

Dynamic Calculations

8

Linked Objects

11

Attributes

12

Integration Server Drill-Through

dimName is the dimension name if styleType is 0; otherwise this parameter should be set to Null.

item is the style you want to set.

newValue contains the setting of item, as shown in Table 37.

Table 37. Item Values

ItemMeaningnewValue

1

Use style

Boolean

2

Font name

Text

3

Font size

Number

4

Bold

Boolean

5

Italic

Boolean

6

Underline

Boolean

7

Strikeout

Boolean

8

Foreground color

Number

9

Background color

Number

10

Border

Boolean

Foreground and background colors are shown in Table 38.

Table 38. Foreground and Background Colors

IntegerColor

1

Black

2

White

3

Red

4

Lime

5

Blue

6

Yellow

7

Fuchsia

8

Aqua

9

Maroon

10

Green

11

Navy

12

Olive

13

Purple

14

Teal

15

Silver

16

Gray

Example

This example sets the style for child members to italic and displays the style in the spreadsheet.

=EssSetStyle("[Sample.xls]Sheet1",1,,5,TRUE)
=EssSetStyle("[Sample.xls]Sheet1",1,,1,TRUE)