Table of Contents

XlsFile.GetStyle Method

Overloads

XlsFile.GetStyle(Int32)

Returns the named style at position index for the workbook

Syntax

Namespace: FlexCel.XlsAdapter

public override TFlxFormat GetStyle(Int32 index)

Parameters

<-> Parameter Type Description
index Int32 Position in the list of styles (1 based).

Returns

The named style definition.

See also

XlsFile.GetStyle(String, Boolean)

Returns a named style for the workbook. You can also use this method to check if a style exists or not.

Syntax

Namespace: FlexCel.XlsAdapter

public override TFlxFormat GetStyle(String name, Boolean convertToCellStyle)

Parameters

<-> Parameter Type Description
name String Name for the style. It might be a user defined name, or a built-in name. You can get a list of builtin names with ExcelFile.GetBuiltInStyleName
convertToCellStyle Boolean If true, the returned style will have the "IsStyle" property set to false, so you can apply this TFlxFormat to a cell. If false IsStyle will be true and you can use the format definition in style definitions.
Setting this parameter to true is exactly the same as setting it to false and setting "IsStyle" property in the result to false, and also setting the parent of the resulting cell format to the cell style.

Returns

The style definition, or null if the style doesn't exists.

See also