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

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

Definition

Namespace:Telerik.WinControls.Export

Assembly:TelerikExport.dll

Syntax:

C#
public class SpreadStreamExportRenderer : ISpreadStreamExportRenderer

Inheritance: objectSpreadStreamExportRenderer

Implements: ISpreadStreamExportRenderer

Constructors

C#
public SpreadStreamExportRenderer()

Properties

Gets or sets the index of the column.

C#
public int ColumnIndex { get; set; }
Property Value:

The index of the column.

Implements: ISpreadStreamExportRenderer.ColumnIndex

Gets or sets the index of the row.

C#
public int RowIndex { get; set; }
Property Value:

The index of the row.

Implements: ISpreadStreamExportRenderer.RowIndex

Methods

Create and add excel worksheet to the workbook.

C#
public virtual void AddWorksheet(string sheetName)
Parameters:sheetNamestring

Excel workbook.

Implements: ISpreadStreamExportRenderer.AddWorksheet(string)

Applies the cell format. Note that format needs to be of SpreadCellFormat type in order to be applied to current cell.

C#
public virtual void ApplyCellFormat(object format)
Parameters:formatobject

The format.

Implements: ISpreadStreamExportRenderer.ApplyCellFormat(object)

Applies the cell style.

C#
public virtual void ApplyCellStyle(ISpreadStreamExportCellStyleInfo cellStyle, string formatString)
Parameters:cellStyleISpreadStreamExportCellStyleInfo

The cell style.

formatStringstring

The format string.

Implements: ISpreadStreamExportRenderer.ApplyCellStyle(ISpreadStreamExportCellStyleInfo, string)

Calls the WorksheetCreated event.

C#
public virtual bool CallOnWorksheetCreated()
Returns:

bool

Implements: ISpreadStreamExportRenderer.CallOnWorksheetCreated()

Clears the value of current Cell.

C#
public virtual void ClearCellValue()

Implements: ISpreadStreamExportRenderer.ClearCellValue()

Creates the border cell style.

C#
public virtual void CreateBorderCellStyle(ISpreadStreamExportCellStyleInfo cellStyle)
Parameters:cellStyleISpreadStreamExportCellStyleInfo

The cell style.

Implements: ISpreadStreamExportRenderer.CreateBorderCellStyle(ISpreadStreamExportCellStyleInfo)

Creates CellSelection.

C#
public virtual void CreateCell()

Implements: ISpreadStreamExportRenderer.CreateCell()

Creates a SpreadStreamCellStyleInfo by given visual styles.

C#
public virtual void CreateCellStyle(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)
Parameters: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.

Implements: ISpreadStreamExportRenderer.CreateCellStyle(Color, Color, FontFamily, double, bool, bool, bool, ContentAlignment, bool, BorderBoxStyle, Color, Color, Color, Color, Color)

Creates the cell style from light style.

C#
public virtual ISpreadStreamExportCellStyleInfo CreateCellStyleFromLightStyle(ISpreadStreamExportCellStyleInfo cellStyle)
Parameters:cellStyleISpreadStreamExportCellStyleInfo

The cell style.

Returns:

ISpreadStreamExportCellStyleInfo

Implements: ISpreadStreamExportRenderer.CreateCellStyleFromLightStyle(ISpreadStreamExportCellStyleInfo)

Creates SpreadStreamCellStyleInfo from theme normal style.

C#
public virtual void CreateCellStyleFromTheme()

Implements: ISpreadStreamExportRenderer.CreateCellStyleFromTheme()

Creates the column.

C#
public virtual void CreateColumn()

Implements: ISpreadStreamExportRenderer.CreateColumn()

Creates freeze panes.

C#
public virtual void CreateFreezePanes(int rowsCount, int columnsCount)
Parameters:rowsCountint

Count of frozen rows.

columnsCountint

Count of frozen columns.

Implements: ISpreadStreamExportRenderer.CreateFreezePanes(int, int)

Creates a SpreadStreamLightCellStyleInfo by given visual styles.

C#
public virtual void CreateLightCellStyle(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)
Parameters: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.

Implements: ISpreadStreamExportRenderer.CreateLightCellStyle(Color, Color, FontFamily, double, bool, bool, bool, ContentAlignment, bool, BorderBoxStyle, Color, Color, Color, Color, Color)

Creates CellSelection.

C#
public virtual void CreateMergedCells(int fromRowIndex, int fromColumnIndex, int toRowIndex, int toColumnIndex)
Parameters:fromRowIndexint

From row index.

fromColumnIndexint

From column index.

toRowIndexint

To row index.

toColumnIndexint

To column index.

Implements: ISpreadStreamExportRenderer.CreateMergedCells(int, int, int, int)

Creates the row.

C#
public virtual void CreateRow()

Implements: ISpreadStreamExportRenderer.CreateRow()

Creates new workbook.

C#
public virtual void CreateWorkbook(Stream stream, SpreadStreamExportFormat exportFormat, FileExportMode fileExportMode)
Parameters:streamStream

The stream.

exportFormatSpreadStreamExportFormat

The export format.

fileExportModeFileExportMode

The file export mode.

Implements: ISpreadStreamExportRenderer.CreateWorkbook(Stream, SpreadStreamExportFormat, FileExportMode)

Creates new workbook.

C#
public virtual void CreateWorkbook(Stream stream, SpreadStreamExportFormat exportFormat)
Parameters:streamStream

The stream.

exportFormatSpreadStreamExportFormat

The export format.

Implements: ISpreadStreamExportRenderer.CreateWorkbook(Stream, SpreadStreamExportFormat)

Finishes the cell.

C#
public virtual void FinishCell()

Implements: ISpreadStreamExportRenderer.FinishCell()

Finishes the column.

C#
protected virtual void FinishColumn()

Exports workbook.

C#
public virtual void FinishExport()

Implements: ISpreadStreamExportRenderer.FinishExport()

Finishes the row.

C#
protected virtual void FinishRow()

Finishes the workbook.

C#
protected virtual void FinishWorkbook()

Finishes the worksheet.

C#
protected virtual void FinishWorksheet()

Gets the borders from existing style.

C#
public virtual ISpreadStreamExportCellStyleInfo GetBordersFromExistingStyle(ISpreadStreamExportCellStyleInfo cellStyle)
Parameters:cellStyleISpreadStreamExportCellStyleInfo

The cell style.

Returns:

ISpreadStreamExportCellStyleInfo

Implements: ISpreadStreamExportRenderer.GetBordersFromExistingStyle(ISpreadStreamExportCellStyleInfo)

Gets current Cell.

C#
public virtual object GetCell()
Returns:

object

Cell as object.

Implements: ISpreadStreamExportRenderer.GetCell()

Gets current SpreadCellFormat.

C#
public virtual object GetCellFormat(bool createNew)
Parameters:createNewboolReturns:

object

Implements: ISpreadStreamExportRenderer.GetCellFormat(bool)

Gets the cell style info.

C#
public virtual ISpreadStreamExportCellStyleInfo GetCellStyleInfo()
Returns:

ISpreadStreamExportCellStyleInfo

Implements: ISpreadStreamExportRenderer.GetCellStyleInfo()

Gets the column.

C#
public virtual object GetColumn()
Returns:

object

Implements: ISpreadStreamExportRenderer.GetColumn()

Gets file extension.

C#
public virtual string GetFileExtension(SpreadStreamExportFormat exportFormat)
Parameters:exportFormatSpreadStreamExportFormat

Export format.

Returns:

string

Implements: ISpreadStreamExportRenderer.GetFileExtension(SpreadStreamExportFormat)

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

C#
public virtual bool GetIsMerged(int rowIndex, int columnIndex)
Parameters:rowIndexint

The row of cell.

columnIndexint

The column of cell.

Returns:

bool

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

Implements: ISpreadStreamExportRenderer.GetIsMerged(int, int)

Gets current Row.

C#
public virtual object GetRow(bool finishCell)
Parameters:finishCellboolReturns:

object

Row as object.

Implements: ISpreadStreamExportRenderer.GetRow(bool)

Gets current worksheet.

C#
public virtual object GetWorksheet()
Returns:

object

Worksheet as object

Implements: ISpreadStreamExportRenderer.GetWorksheet()

Groups current row in current worksheet.

C#
public virtual void GroupCurrentRow(int level)
Parameters:levelint

Outline level.

Implements: ISpreadStreamExportRenderer.GroupCurrentRow(int)

Raises the event.

C#
protected virtual void OnWorkbookCreated(SpreadStreamWorkbookEventArgs e)
Parameters:eSpreadStreamWorkbookEventArgs

The SpreadStreamWorkbookEventArgs instance containing the event data.

Raises the event.

C#
protected virtual bool OnWorksheetCreated(SpreadStreamWorksheetEventArgs e)
Parameters:eSpreadStreamWorksheetEventArgs

The SpreadStreamWorksheetEventArgs instance containing the event data.

Returns:

bool

Raises the event.

C#
protected virtual void OnWorksheetExporting(SpreadStreamWorksheetEventArgs e)
Parameters:eSpreadStreamWorksheetEventArgs

The SpreadStreamWorksheetEventArgs instance containing the event data.

Sets the value as boolean.

C#
protected virtual bool SetBooleanValue(object value)
Parameters:valueobject

The value.

Returns:

bool

True is the cell value is set, otherwise - false.

Sets the cell format.

C#
public virtual void SetCellFormat(string formatString, bool apply)
Parameters:formatStringstring

The format string.

applybool

The apply.

Implements: ISpreadStreamExportRenderer.SetCellFormat(string, bool)

Sets the value of current CellSelection.

C#
public virtual void SetCellValue(DataType dataType, object value)
Parameters:dataTypeDataType

CellSelection data type.

valueobject

Value.

Implements: ISpreadStreamExportRenderer.SetCellValue(DataType, object)

Sets the value of current CellSelection.

C#
public virtual void SetCellValue(string text)
Parameters:textstring

Text.

Implements: ISpreadStreamExportRenderer.SetCellValue(string)

Sets the width of current worksheet column.

C#
public virtual void SetColumnWidth(double width, bool inPixels)
Parameters:widthdouble

The width.

inPixelsbool

If true, setts the width in pixels, otherwise - in characters.

Implements: ISpreadStreamExportRenderer.SetColumnWidth(double, bool)

Sets the value as date time.

C#
protected virtual bool SetDateTimeValue(object value)
Parameters:valueobject

The value.

Returns:

bool

True is the cell value is set, otherwise - false.

Sets current worksheet column as hidden.

C#
public virtual void SetHiddenColumn()

Implements: ISpreadStreamExportRenderer.SetHiddenColumn()

Sets current worksheet row as hidden.

C#
public virtual void SetHiddenRow()

Implements: ISpreadStreamExportRenderer.SetHiddenRow()

Sets the value as number.

C#
protected virtual bool SetNumberValue(object value)
Parameters:valueobject

The value.

Returns:

bool

True is the cell value is set, otherwise - false.

Sets height of current row in worksheet.

C#
public virtual void SetRowHeight(double height, bool inPixels)
Parameters:heightdouble

Height of row.

inPixelsbool

If true, sets the row height in pixels, otherwise - in points.

Implements: ISpreadStreamExportRenderer.SetRowHeight(double, bool)

Sets the value as string.

C#
protected virtual bool SetStringValue(object value)
Parameters:valueobject

The value.

Returns:

bool

True is the cell value is set, otherwise - false.

Skips the cells.

C#
public virtual void SkipCells(int count)
Parameters:countint

The count.

Implements: ISpreadStreamExportRenderer.SkipCells(int)

Skips the columns.

C#
public virtual void SkipColumns(int count)
Parameters:countint

The count.

Implements: ISpreadStreamExportRenderer.SkipColumns(int)

Events

Occurs when the workbook is created. This is suitable place to add and/or modify cell styles.

C#
public event SpreadStreamWorkbookEventHandler WorkbookCreated

Occurs when a new worksheet is created. This is suitable place to set width of columns, add indent/header rows.

C#
public event SpreadStreamWorksheetEventHandler WorksheetCreated

Occurs when a worksheet is about to be exported. This is suitable place to add footer rows.

C#
public event SpreadStreamWorksheetEventHandler WorksheetExporting
In this article
DefinitionConstructorsSpreadStreamExportRenderer()PropertiesColumnIndexRowIndexMethodsAddWorksheet(string)ApplyCellFormat(object)ApplyCellStyle(ISpreadStreamExportCellStyleInfo, string)CallOnWorksheetCreated()ClearCellValue()CreateBorderCellStyle(ISpreadStreamExportCellStyleInfo)CreateCell()CreateCellStyle(Color, Color, FontFamily, double, bool, bool, bool, ContentAlignment, bool, BorderBoxStyle, Color, Color, Color, Color, Color)CreateCellStyleFromLightStyle(ISpreadStreamExportCellStyleInfo)CreateCellStyleFromTheme()CreateColumn()CreateFreezePanes(int, int)CreateLightCellStyle(Color, Color, FontFamily, double, bool, bool, bool, ContentAlignment, bool, BorderBoxStyle, Color, Color, Color, Color, Color)CreateMergedCells(int, int, int, int)CreateRow()CreateWorkbook(Stream, SpreadStreamExportFormat, FileExportMode)CreateWorkbook(Stream, SpreadStreamExportFormat)FinishCell()FinishColumn()FinishExport()FinishRow()FinishWorkbook()FinishWorksheet()GetBordersFromExistingStyle(ISpreadStreamExportCellStyleInfo)GetCell()GetCellFormat(bool)GetCellStyleInfo()GetColumn()GetFileExtension(SpreadStreamExportFormat)GetIsMerged(int, int)GetRow(bool)GetWorksheet()GroupCurrentRow(int)OnWorkbookCreated(SpreadStreamWorkbookEventArgs)OnWorksheetCreated(SpreadStreamWorksheetEventArgs)OnWorksheetExporting(SpreadStreamWorksheetEventArgs)SetBooleanValue(object)SetCellFormat(string, bool)SetCellValue(DataType, object)SetCellValue(string)SetColumnWidth(double, bool)SetDateTimeValue(object)SetHiddenColumn()SetHiddenRow()SetNumberValue(object)SetRowHeight(double, bool)SetStringValue(object)SkipCells(int)SkipColumns(int)EventsWorkbookCreatedWorksheetCreatedWorksheetExporting
Not finding the help you need?
Contact Support