Référence de l’API

IStyleData

Cette page API est actuellement disponible en anglais. Les signatures et identifiants restent identiques dans toutes les langues.

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

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

tr

Optional · Nullable<ITextRotation>

textRotation

td

Optional · Nullable<TextDirection>

textDirection

ht

Optional · Nullable<HorizontalAlign>

horizontalAlignment

vt

Optional · Nullable<VerticalAlign>

verticalAlignment

tb

Optional · Nullable<WrapStrategy>

wrapStrategy

pd

Optional · Nullable<IPaddingData>

padding

ff

Optional · Nullable<string>

fontFamily

eastAsiaFontFamily

Optional · Nullable<string>

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

italic 0: false 1: true

bl

Optional · BooleanNumber | undefined

bold 0: false 1: true

ul

Optional · ITextDecoration | undefined

underline

bbl

Optional · ITextDecoration | undefined

bottomBorerLine

st

Optional · ITextDecoration | undefined

strikethrough

ol

Optional · ITextDecoration | undefined

overline

bg

Optional · Nullable<IColorStyle>

background

bd

Optional · Nullable<IBorderData>

border

cl

Optional · Nullable<IColorStyle>

foreground

va

Optional · Nullable<BaselineOffset>

(Subscript 下标 /Superscript上标 Text)

n

Optional · Nullable<{ pattern: string; }>

Numfmt pattern

Package: @univerjs/core · Type definitions

Que pensez-vous de ce guide ?

© 2026 DreamNum Co., Ltd.