DefaultStyleSettings

DefaultStyleSettings class

Settings for the default values of workbook’s style properties.

class DefaultStyleSettings;

Methods

MethodDescription
getBuiltInPreference()Indicates whether property for number format is preferrable when the style defines both built-in number and custom pattern. Default value is false, that means by default custom pattern will be used to format values as long as it is not empty for one style.
setBuiltInPreference(boolean)Indicates whether property for number format is preferrable when the style defines both built-in number and custom pattern. Default value is false, that means by default custom pattern will be used to format values as long as it is not empty for one style.
getFontName()Gets/Sets the default font name for the workbook
setFontName(string)Gets/Sets the default font name for the workbook
getFontSize()Gets/Sets the default standard font size for the workbook.
setFontSize(number)Gets/Sets the default standard font size for the workbook.
getHorizontalAlignment()Gets/Sets the default value for horizontal alignment
setHorizontalAlignment(TextAlignmentType)Gets/Sets the default value for horizontal alignment
getVerticalAlignment()Gets/Sets the default value for vertical alignment
setVerticalAlignment(TextAlignmentType)Gets/Sets the default value for vertical alignment
isNull()Checks whether the implementation object is null.

getBuiltInPreference()

Indicates whether property for number format is preferrable when the style defines both built-in number and custom pattern. Default value is false, that means by default custom pattern will be used to format values as long as it is not empty for one style.

getBuiltInPreference() : boolean;

Remarks

When loading workbook from existing template file, maybe both built-in number and custom pattern are defined for one style. This property determine whether we should use the built-in number or the custom pattern when formatting values with the style.

setBuiltInPreference(boolean)

Indicates whether property for number format is preferrable when the style defines both built-in number and custom pattern. Default value is false, that means by default custom pattern will be used to format values as long as it is not empty for one style.

setBuiltInPreference(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

When loading workbook from existing template file, maybe both built-in number and custom pattern are defined for one style. This property determine whether we should use the built-in number or the custom pattern when formatting values with the style.

getFontName()

Gets/Sets the default font name for the workbook

getFontName() : string;

setFontName(string)

Gets/Sets the default font name for the workbook

setFontName(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getFontSize()

Gets/Sets the default standard font size for the workbook.

getFontSize() : number;

setFontSize(number)

Gets/Sets the default standard font size for the workbook.

setFontSize(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getHorizontalAlignment()

Gets/Sets the default value for horizontal alignment

getHorizontalAlignment() : TextAlignmentType;

Returns

TextAlignmentType

setHorizontalAlignment(TextAlignmentType)

Gets/Sets the default value for horizontal alignment

setHorizontalAlignment(value: TextAlignmentType) : void;

Parameters:

ParameterTypeDescription
valueTextAlignmentTypeThe value to set.

getVerticalAlignment()

Gets/Sets the default value for vertical alignment

getVerticalAlignment() : TextAlignmentType;

Returns

TextAlignmentType

setVerticalAlignment(TextAlignmentType)

Gets/Sets the default value for vertical alignment

setVerticalAlignment(value: TextAlignmentType) : void;

Parameters:

ParameterTypeDescription
valueTextAlignmentTypeThe value to set.

isNull()

Checks whether the implementation object is null.

isNull() : boolean;