DefaultStyleSettings

DefaultStyleSettings class

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

class DefaultStyleSettings;

Properties

PropertyTypeDescription
builtInPreferencebooleanIndicates whether property for number format is preferable 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

builtInPreference

Indicates whether property for number format is preferable 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;