DefaultStyleSettings

DefaultStyleSettings class

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

class DefaultStyleSettings;

Properties

PropertyTypeDescription
builtInPreferencebooleanIndicates 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.
fontNamestringGets/Sets the default font name for the workbook
fontSizenumberGets/Sets the default standard font size for the workbook.
horizontalAlignmentTextAlignmentTypeGets/Sets the default value for horizontal alignment
verticalAlignmentTextAlignmentTypeGets/Sets the default value for vertical alignment

Methods

MethodDescription
getBuiltInPreference()@deprecated. Please use the ‘builtInPreference’ property instead. 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)@deprecated. Please use the ‘builtInPreference’ property instead. 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()@deprecated. Please use the ‘fontName’ property instead. Gets/Sets the default font name for the workbook
setFontName(string)@deprecated. Please use the ‘fontName’ property instead. Gets/Sets the default font name for the workbook
getFontSize()@deprecated. Please use the ‘fontSize’ property instead. Gets/Sets the default standard font size for the workbook.
setFontSize(number)@deprecated. Please use the ‘fontSize’ property instead. Gets/Sets the default standard font size for the workbook.
getHorizontalAlignment()@deprecated. Please use the ‘horizontalAlignment’ property instead. Gets/Sets the default value for horizontal alignment
setHorizontalAlignment(TextAlignmentType)@deprecated. Please use the ‘horizontalAlignment’ property instead. Gets/Sets the default value for horizontal alignment
getVerticalAlignment()@deprecated. Please use the ‘verticalAlignment’ property instead. Gets/Sets the default value for vertical alignment
setVerticalAlignment(TextAlignmentType)@deprecated. Please use the ‘verticalAlignment’ property instead. Gets/Sets the default value for vertical alignment
isNull()Checks whether the implementation object is null.

builtInPreference

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.

builtInPreference : 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.

fontName

Gets/Sets the default font name for the workbook

fontName : string;

fontSize

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

fontSize : number;

horizontalAlignment

Gets/Sets the default value for horizontal alignment

horizontalAlignment : TextAlignmentType;

verticalAlignment

Gets/Sets the default value for vertical alignment

verticalAlignment : TextAlignmentType;

getBuiltInPreference()

@deprecated. Please use the ‘builtInPreference’ property instead. 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)

@deprecated. Please use the ‘builtInPreference’ property instead. 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()

@deprecated. Please use the ‘fontName’ property instead. Gets/Sets the default font name for the workbook

getFontName() : string;

setFontName(string)

@deprecated. Please use the ‘fontName’ property instead. Gets/Sets the default font name for the workbook

setFontName(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getFontSize()

@deprecated. Please use the ‘fontSize’ property instead. Gets/Sets the default standard font size for the workbook.

getFontSize() : number;

setFontSize(number)

@deprecated. Please use the ‘fontSize’ property instead. Gets/Sets the default standard font size for the workbook.

setFontSize(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getHorizontalAlignment()

@deprecated. Please use the ‘horizontalAlignment’ property instead. Gets/Sets the default value for horizontal alignment

getHorizontalAlignment() : TextAlignmentType;

Returns

TextAlignmentType

setHorizontalAlignment(TextAlignmentType)

@deprecated. Please use the ‘horizontalAlignment’ property instead. Gets/Sets the default value for horizontal alignment

setHorizontalAlignment(value: TextAlignmentType) : void;

Parameters:

ParameterTypeDescription
valueTextAlignmentTypeThe value to set.

getVerticalAlignment()

@deprecated. Please use the ‘verticalAlignment’ property instead. Gets/Sets the default value for vertical alignment

getVerticalAlignment() : TextAlignmentType;

Returns

TextAlignmentType

setVerticalAlignment(TextAlignmentType)

@deprecated. Please use the ‘verticalAlignment’ property instead. 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;