API Reference

IStyleData

Cell formatting, including fonts, fills, borders, alignment, and wrapping. Store a style directly in ICellData.s or register it in IWorkbookData.styles and reference its ID.

Import

TypeScript
import type { IStyleData } from '@univerjs/core'

Definition

TypeScript
interface IStyleData extends IStyleBase {  stf?: BooleanNumber  tr?: Nullable<ITextRotation>  td?: Nullable<TextDirection>  ht?: Nullable<HorizontalAlign>  vt?: Nullable<VerticalAlign>  tb?: Nullable<WrapStrategy>  pd?: Nullable<IPaddingData>}

Fields

stf

Optional · BooleanNumber | undefined — BooleanNumber

Whether the font size should shrink to fit the cell width.

tr

Optional · Nullable<ITextRotation> — ITextRotation · Nullable

textRotation

td

Optional · Nullable<TextDirection> — TextDirection · Nullable

textDirection

ht

Optional · Nullable<HorizontalAlign> — HorizontalAlign · Nullable

horizontalAlignment

vt

Optional · Nullable<VerticalAlign> — VerticalAlign · Nullable

verticalAlignment

tb

Optional · Nullable<WrapStrategy> — WrapStrategy · Nullable

wrapStrategy

pd

Optional · Nullable<IPaddingData> — IPaddingData · Nullable

padding

ff

Optional · Nullable<string> — Nullable

fontFamily

eastAsiaFontFamily

Optional · Nullable<string> — Nullable

Font family used for East Asian characters in rich text.

fs

Optional · number | undefined

Font size in points (pt), where 1 pt is 1/72 inch.

it

Optional · BooleanNumber | undefined — BooleanNumber

italic 0: false 1: true

bl

Optional · BooleanNumber | undefined — BooleanNumber

bold 0: false 1: true

ul

Optional · ITextDecoration | undefined — ITextDecoration

underline

bbl

Optional · ITextDecoration | undefined — ITextDecoration

bottomBorerLine

st

Optional · ITextDecoration | undefined — ITextDecoration

strikethrough

ol

Optional · ITextDecoration | undefined — ITextDecoration

overline

bg

Optional · Nullable<IColorStyle> — IColorStyle · Nullable

background

bd

Optional · Nullable<IBorderData> — IBorderData · Nullable

border

cl

Optional · Nullable<IColorStyle> — IColorStyle · Nullable

foreground

va

Optional · Nullable<BaselineOffset> — BaselineOffset · Nullable

(Subscript 下标 /Superscript上标 Text)

n

Optional · Nullable<{ pattern: string; }> — Nullable

Numfmt pattern

Package: @univerjs/core · Type definitions

How is this guide?

© 2026 DreamNum Co., Ltd.