New to Telerik UI for WinFormsStart a free 30-day trial

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:

C#
public class CellStyleInfo : ISpreadExportCellStyleInfo

Inheritance: objectCellStyleInfo

Implements: ISpreadExportCellStyleInfo

Constructors

Initializes a new instance of the CellStyleInfo class.

C#
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:currentExcelCellCellSelection

Current excel cell.

backColorColor

BackColor of cell.

foreColorColor

ForeColor of cell.

fontFamilyFontFamily

FontFamily of cell.

fontSizedouble

Font size of cell.

isBoldbool

Is text bold.

isItalicbool

Is text italic.

underlinebool

Is text underlined.

textAlignmentContentAlignment

Text alignment.

textWrapbool

Is text wrapped.

borderBoxStyleBorderBoxStyle

Border box style.

borderColorColor

Color of border.

borderTopColorColor

Color of top border.

borderBottomColorColor

Color of bottom border.

borderRightColorColor

Color of right border.

borderLeftColorColor

Color of left border.

textOrientationOrientation

The text orientation.

Initializes a new instance of the CellStyleInfo class.

C#
public CellStyleInfo(CellSelection currentExcelCell, Worksheet worksheet)
Parameters:currentExcelCellCellSelection

The current excel cell.

worksheetWorksheet

The worksheet.

Properties

Gets or sets the fill of the excel cell.

C#
public Color BackColor { get; set; }
Property Value:

The fill.

Implements: ISpreadExportCellStyleInfo.BackColor

Gets or sets the borders.

C#
public object Borders { get; set; }
Property Value:

The borders.

Implements: ISpreadExportCellStyleInfo.Borders

Gets or sets the font family of the excel cell.

C#
public FontFamily FontFamily { get; set; }
Property Value:

The font family.

Implements: ISpreadExportCellStyleInfo.FontFamily

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

C#
public double FontSize { get; set; }
Property Value:

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

Implements: ISpreadExportCellStyleInfo.FontSize

Gets or sets the ForeColor of the excel cell.

C#
public Color ForeColor { get; set; }
Property Value:

The ForeColor.

Implements: ISpreadExportCellStyleInfo.ForeColor

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

C#
public bool IsBold { get; set; }
Property Value:

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

Implements: ISpreadExportCellStyleInfo.IsBold

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

C#
public bool IsItalic { get; set; }
Property Value:

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

Implements: ISpreadExportCellStyleInfo.IsItalic

Gets or sets the text alignment.

C#
public ContentAlignment TextAlignment { get; set; }
Property Value:

The text alignment.

Implements: ISpreadExportCellStyleInfo.TextAlignment

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.

C#
public Orientation TextOrientation { get; set; }

Implements: ISpreadExportCellStyleInfo.TextOrientation

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

C#
public bool TextWrap { get; set; }
Property Value:

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

Implements: ISpreadExportCellStyleInfo.TextWrap

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

C#
public bool Underline { get; set; }
Property Value:

The underline type.

Implements: ISpreadExportCellStyleInfo.Underline