Class
CellStyleInfo

A wrapper class used to transform the Windows forms types to types compatible with the CellSelection object needs

Definition

Namespace:Telerik.WinControls.Export

Assembly:TelerikExport.dll

Syntax:

cs-api-definition
public class CellStyleInfo : ISpreadExportCellStyleInfo

Inheritance: objectCellStyleInfo

Implements: ISpreadExportCellStyleInfo

Constructors

CellStyleInfo(CellSelection, Color, Color, FontFamily, double, bool, bool, bool, ContentAlignment, bool, BorderBoxStyle, Color, Color, Color, Color, Color, Orientation)

Initializes a new instance of the CellStyleInfo class.

Declaration

cs-api-definition
public CellStyleInfo(CellSelection currentExcelCell, Color backColor, Color foreColor, FontFamily fontFamily, double fontSize, bool isBold, bool isItalic, bool underline, ContentAlignment textAlignment, bool textWrap, BorderBoxStyle borderBoxStyle, Color borderColor, Color borderTopColor, Color borderBottomColor, Color borderRightColor, Color borderLeftColor, Orientation textOrientation = Orientation.Horizontal)

Parameters

currentExcelCell

CellSelection

Current excel cell.

backColor

Color

BackColor of cell.

foreColor

Color

ForeColor of cell.

fontFamily

FontFamily

FontFamily of cell.

fontSize

double

Font size of cell.

isBold

bool

Is text bold.

isItalic

bool

Is text italic.

underline

bool

Is text underlined.

textAlignment

ContentAlignment

Text alignment.

textWrap

bool

Is text wrapped.

borderBoxStyle

BorderBoxStyle

Border box style.

borderColor

Color

Color of border.

borderTopColor

Color

Color of top border.

borderBottomColor

Color

Color of bottom border.

borderRightColor

Color

Color of right border.

borderLeftColor

Color

Color of left border.

textOrientation

Orientation

The text orientation.

CellStyleInfo(CellSelection, Worksheet)

Initializes a new instance of the CellStyleInfo class.

Declaration

cs-api-definition
public CellStyleInfo(CellSelection currentExcelCell, Worksheet worksheet)

Parameters

currentExcelCell

CellSelection

The current excel cell.

worksheet

Worksheet

The worksheet.

Properties

BackColor

Gets or sets the fill of the excel cell.

Declaration

cs-api-definition
public Color BackColor { get; set; }

Property Value

Color

The fill.

Implements ISpreadExportCellStyleInfo.BackColor

Borders

Gets or sets the borders.

Declaration

cs-api-definition
public object Borders { get; set; }

Property Value

object

The borders.

Implements ISpreadExportCellStyleInfo.Borders

FontFamily

Gets or sets the font family of the excel cell.

Declaration

cs-api-definition
public FontFamily FontFamily { get; set; }

Property Value

FontFamily

The font family.

Implements ISpreadExportCellStyleInfo.FontFamily

FontSize

Gets or sets the size of the font of the excel cell.

Declaration

cs-api-definition
public double FontSize { get; set; }

Property Value

double

The size of the font in points (pt). It will be automatically converted to the Device Independent Pixels, when setting.

Implements ISpreadExportCellStyleInfo.FontSize

ForeColor

Gets or sets the ForeColor of the excel cell.

Declaration

cs-api-definition
public Color ForeColor { get; set; }

Property Value

Color

The ForeColor.

Implements ISpreadExportCellStyleInfo.ForeColor

IsBold

Gets or sets a value indicating whether this text of the excel cell is bold.

Declaration

cs-api-definition
public bool IsBold { get; set; }

Property Value

bool

true if the text of the excel cell is bold; otherwise, false.

Implements ISpreadExportCellStyleInfo.IsBold

IsItalic

Gets or sets a value indicating whether the text of the excel cell is italic.

Declaration

cs-api-definition
public bool IsItalic { get; set; }

Property Value

bool

true if the text of the excel cell is italic; otherwise, false.

Implements ISpreadExportCellStyleInfo.IsItalic

TextAlignment

Gets or sets the text alignment.

Declaration

cs-api-definition
public ContentAlignment TextAlignment { get; set; }

Property Value

ContentAlignment

The text alignment.

Implements ISpreadExportCellStyleInfo.TextAlignment

TextOrientation

Gets or sets the orientation of the text. The available values are Horizontal(default) or vertical. Note that the TextOrientation is currently supported only when exporting to XLSX format.

Declaration

cs-api-definition
public Orientation TextOrientation { get; set; }

Property Value

Orientation

Implements ISpreadExportCellStyleInfo.TextOrientation

TextWrap

Gets or sets a value indicating whether the text of the excel cell is wrapped.

Declaration

cs-api-definition
public bool TextWrap { get; set; }

Property Value

bool

true if the text of the excel cell is wrapped; otherwise, false.

Implements ISpreadExportCellStyleInfo.TextWrap

Underline

Gets or sets whether the text of the excel cell is underline.

Declaration

cs-api-definition
public bool Underline { get; set; }

Property Value

bool

The underline type.

Implements ISpreadExportCellStyleInfo.Underline