Class
SpreadExportRenderer

Represents a class which exposes all methods needed to export using RadSpreadProcessing.

Definition

Namespace:Telerik.WinControls.Export

Assembly:TelerikExport.dll

Syntax:

cs-api-definition
public class SpreadExportRenderer : ISpreadExportRenderer

Inheritance: objectSpreadExportRenderer

Implements: ISpreadExportRenderer

Constructors

SpreadExportRenderer()

Declaration

cs-api-definition
public SpreadExportRenderer()

Methods

Declaration

cs-api-definition
public virtual void AddHyperlink(string link)

Parameters

link

string

Implements ISpreadExportRenderer.AddHyperlink(string)

AddWorksheet(string)

Create and add excel worksheet to the workbook.

Declaration

cs-api-definition
public virtual void AddWorksheet(string sheetName)

Parameters

sheetName

string

Excel workbook.

Implements ISpreadExportRenderer.AddWorksheet(string)

CallWorkbookCreated()

Calls event.

Declaration

cs-api-definition
public virtual void CallWorkbookCreated()

Implements ISpreadExportRenderer.CallWorkbookCreated()

ClearCellSelectionValue()

Clears the value of current CellSelection.

Declaration

cs-api-definition
public virtual void ClearCellSelectionValue()

Implements ISpreadExportRenderer.ClearCellSelectionValue()

CreateCellSelection(int, int)

Creates CellSelection.

Declaration

cs-api-definition
public virtual void CreateCellSelection(int rowIndex, int columnIndex)

Parameters

rowIndex

int

Row index.

columnIndex

int

Column index.

Implements ISpreadExportRenderer.CreateCellSelection(int, int)

CreateCellSelection(int, int, int, int)

Creates CellSelection.

Declaration

cs-api-definition
public virtual void CreateCellSelection(int fromRowIndex, int fromColumnIndex, int toRowIndex, int toColumnIndex)

Parameters

fromRowIndex

int

From row index.

fromColumnIndex

int

From column index.

toRowIndex

int

To row index.

toColumnIndex

int

To column index.

Implements ISpreadExportRenderer.CreateCellSelection(int, int, int, int)

CreateCellStyleInfo()

Creates CellStyleInfo using current CellSelection and Worksheet.

Declaration

cs-api-definition
public virtual void CreateCellStyleInfo()

Implements ISpreadExportRenderer.CreateCellStyleInfo()

CreateCellStyleInfo(Color, Color, FontFamily, double, bool, bool, bool, ContentAlignment, bool, BorderBoxStyle, Color, Color, Color, Color, Color, Orientation)

Creates CellStyleInfo.

Declaration

cs-api-definition
public virtual void CreateCellStyleInfo(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

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/

Implements ISpreadExportRenderer.CreateCellStyleInfo(Color, Color, FontFamily, double, bool, bool, bool, ContentAlignment, bool, BorderBoxStyle, Color, Color, Color, Color, Color, Orientation)

CreateFloatingImage(int, int, int, int, byte[], string, int, int, int)

Creates a new floating image in current worksheet.

Declaration

cs-api-definition
public virtual void CreateFloatingImage(int rowIndex, int columnIndex, int offsetX, int offsetY, byte[] bytes, string extension, int width, int height, int rotationAngle)

Parameters

rowIndex

int

columnIndex

int

offsetX

int

offsetY

int

bytes

byte[]

extension

string

width

int

height

int

rotationAngle

int

Implements ISpreadExportRenderer.CreateFloatingImage(int, int, int, int, byte[], string, int, int, int)

CreateFreezePanes(int, int)

Creates freeze panes.

Declaration

cs-api-definition
public virtual void CreateFreezePanes(int rowsCount, int columnsCount)

Parameters

rowsCount

int

Count of frozen rows.

columnsCount

int

Count of frozen columns.

Implements ISpreadExportRenderer.CreateFreezePanes(int, int)

CreateWorkbook()

Creates new workbook.

Declaration

cs-api-definition
public virtual void CreateWorkbook()

Implements ISpreadExportRenderer.CreateWorkbook()

Export(Stream)

Exports workbook.

Declaration

cs-api-definition
public virtual void Export(Stream stream)

Parameters

stream

Stream

Associated stream.

Implements ISpreadExportRenderer.Export(Stream)

GetCellSelection()

Gets current CellSelection.

Declaration

cs-api-definition
public virtual object GetCellSelection()

Returns

object

CellSelection as object.

Implements ISpreadExportRenderer.GetCellSelection()

GetCellSelectionValue()

Gets the value of current CellSelection.

Declaration

cs-api-definition
public virtual object GetCellSelectionValue()

Returns

object

Implements ISpreadExportRenderer.GetCellSelectionValue()

GetCellStyleInfo()

Gets current CellStyleInfo.

Declaration

cs-api-definition
public virtual ISpreadExportCellStyleInfo GetCellStyleInfo()

Returns

ISpreadExportCellStyleInfo

Implements ISpreadExportRenderer.GetCellStyleInfo()

GetFileExtension(SpreadExportFormat)

Gets file extension.

Declaration

cs-api-definition
public virtual object GetFileExtension(SpreadExportFormat exportFormat)

Parameters

exportFormat

SpreadExportFormat

Export format.

Returns

object

Implements ISpreadExportRenderer.GetFileExtension(SpreadExportFormat)

GetFormatProvider(SpreadExportFormat)

Gets current format provider.

Declaration

cs-api-definition
public virtual void GetFormatProvider(SpreadExportFormat exportFormat)

Parameters

exportFormat

SpreadExportFormat

Export format.

Implements ISpreadExportRenderer.GetFormatProvider(SpreadExportFormat)

GetIsMerged(int, int)

Determines if a cell(by given row and column index) belongs to a merged cell.

Declaration

cs-api-definition
public virtual bool GetIsMerged(int rowIndex, int columnIndex)

Parameters

rowIndex

int

The row of cell.

columnIndex

int

The column of cell.

Returns

bool

A value indicating, whether given cell is part of a merged cell.

Implements ISpreadExportRenderer.GetIsMerged(int, int)

GetWorksheet()

Gets current worksheet.

Declaration

cs-api-definition
public virtual object GetWorksheet()

Returns

object

Worksheet as object

Implements ISpreadExportRenderer.GetWorksheet()

GetWorksheetColumnWidth(int)

Gets the width of column by given column index.

Declaration

cs-api-definition
public virtual int GetWorksheetColumnWidth(int columnIndex)

Parameters

columnIndex

int

Column index

Returns

int

Column width

Implements ISpreadExportRenderer.GetWorksheetColumnWidth(int)

GetWorksheetRowHeight(int)

Gets height of row in worksheet by given row index.

Declaration

cs-api-definition
public virtual double GetWorksheetRowHeight(int rowIndex)

Parameters

rowIndex

int

Row index.

Returns

double

Implements ISpreadExportRenderer.GetWorksheetRowHeight(int)

GroupRows(int, int, int)

Groups rows in current worksheet.

Declaration

cs-api-definition
public virtual void GroupRows(int startRow, int endRow, int level)

Parameters

startRow

int

Start row.

endRow

int

End row.

level

int

Outline level.

Implements ISpreadExportRenderer.GroupRows(int, int, int)

ImportWorkbook(Stream)

Imports workbook.

Declaration

cs-api-definition
public virtual void ImportWorkbook(Stream stream)

Parameters

stream

Stream

Associated stream.

Implements ISpreadExportRenderer.ImportWorkbook(Stream)

MergeCellSelection()

Merges the cells of current CellSelection.

Declaration

cs-api-definition
public virtual void MergeCellSelection()

Implements ISpreadExportRenderer.MergeCellSelection()

OnWorkbookCreated(WorkbookCreatedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnWorkbookCreated(WorkbookCreatedEventArgs e)

Parameters

e

WorkbookCreatedEventArgs

The WorkbookCreatedEventArgs instance containing the event data.

RegisterFormatProvider(SpreadExportFormat)

Registers format provider.

Declaration

cs-api-definition
public virtual void RegisterFormatProvider(SpreadExportFormat exportFormat)

Parameters

exportFormat

SpreadExportFormat

Export format.

Implements ISpreadExportRenderer.RegisterFormatProvider(SpreadExportFormat)

ReplaceWorksheet(string)

Removes an existing worksheet from the workbook and creates a new one with the same name. If there is no sheet with this name, only creates a new one.

Declaration

cs-api-definition
public virtual bool ReplaceWorksheet(string sheetName)

Parameters

sheetName

string

The name of the sheet to be replaced.

Returns

bool

A value indicating whether a sheet with given name was removed.

Implements ISpreadExportRenderer.ReplaceWorksheet(string)

SetCellSelectionFormat(string)

Sets format of current CellSelection.

Declaration

cs-api-definition
public virtual void SetCellSelectionFormat(string formatString)

Parameters

formatString

string

Format string.

Implements ISpreadExportRenderer.SetCellSelectionFormat(string)

SetCellSelectionValue(DataType, object)

Sets the value of current CellSelection.

Declaration

cs-api-definition
public virtual void SetCellSelectionValue(DataType dataType, object value)

Parameters

dataType

DataType

CellSelection data type.

value

object

Value.

Implements ISpreadExportRenderer.SetCellSelectionValue(DataType, object)

SetCellSelectionValue(string)

Sets the value of current CellSelection.

Declaration

cs-api-definition
public virtual void SetCellSelectionValue(string text)

Parameters

text

string

Text.

Implements ISpreadExportRenderer.SetCellSelectionValue(string)

SetWorksheetColumnWidth(int, double, bool)

Sets width of column in worksheet by given column index.

Declaration

cs-api-definition
public virtual void SetWorksheetColumnWidth(int columnIndex, double value, bool isCustom)

Parameters

columnIndex

int

Column index.

value

double

Width of column.

isCustom

bool

Implements ISpreadExportRenderer.SetWorksheetColumnWidth(int, double, bool)

SetWorksheetRowHeight(int, int, bool)

Sets height of row in worksheet by given row index.

Declaration

cs-api-definition
public virtual void SetWorksheetRowHeight(int rowIndex, int rowHeight, bool isCustom)

Parameters

rowIndex

int

Row index.

rowHeight

int

Height of row.

isCustom

bool

Implements ISpreadExportRenderer.SetWorksheetRowHeight(int, int, bool)

Events

WorkbookCreated

Occurs when the workbook is created and is ready to be exported. Suitable for any final touches.

Declaration

cs-api-definition
public event WorkbookCreatedEventHandler WorkbookCreated

Event Value

WorkbookCreatedEventHandler