Set Style

Method that allows various style changes to be made to the cell.


⬅️INPUT

Parameter

Type

Required

Description

FilePath

String

✅Yes

Excel file path

Data

Byte[]

✅Yes

Excel file data (byte array)

SheetName

String

❌No

Target sheet name

Cell

String

✅Yes

Target cell address

FontName

String

❌No

Font name

SetItalic

Boolean

❌No

Whether to change italic

Italic

Boolean

❌No

Italic value

SetBold

Boolean

❌No

Whether to change bold

Bold

Boolean

❌No

Bold value

Size

Int32

❌No

Font size

Color

String

❌No

Font color

UnderlineStyle

String

❌No

Underline style

SetStrikeout

Boolean

❌No

Whether to change strikethrough

Strikeout

Boolean

❌No

Strikethrough value

ScriptPosition

String

❌No

Subscript/superscript position

VerticalAlignment

Int32

❌No

Vertical alignment
Top = 1
Center = 2
Bottom = 3
Justify = 4
Distributed = 5

HorizontalAlignment

Int32

❌No

Horizontal alignment
General = 1
Left = 2
Center = 3
Right = 4
Fill = 5
Justify = 6
Center Across Selection = 7
Distributed = 8

NumberFormat

String

❌No

Number format


➡️OUTPUT

Parameter

Type

Description

IsSetStyleSuccessful

String

Whether the operation succeeded

SetStyleMessage

String

Operation result message

SetStyleResult

Byte[]

Updated Excel file


⬇️MISC

Parameter

Type

Default

Description

ThrowException

Boolean

❌No

Throw exception on error