New to Telerik UI for WinForms? Start a free 30-day trial

Defines the operations used by GridView stream export to write workbook, worksheet, row, cell, and style data.

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

C#
public interface ISpreadStreamExportRenderer

Properties

Gets or sets the column currently addressed by the renderer.

C#
int ColumnIndex { get; set; }

Gets or sets the row currently addressed by the renderer.

C#
int RowIndex { get; set; }

Methods

Adds a worksheet with the specified name to the workbook.

C#
void AddWorksheet(string sheetName)
Parameters:sheetNamestring

The worksheet name.

Applies a renderer-specific format object to the current cell.

C#
void ApplyCellFormat(object format)
Parameters:formatobject

The format object to apply.

Applies a style and format string to the current cell.

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

The style attributes to apply.

formatStringstring

The value format string to apply.

Invokes the worksheet-created handler when one is subscribed.

C#
bool CallOnWorksheetCreated()
Returns:

bool

true if a worksheet-created handler was invoked; otherwise, false.

Clears the value from the current cell.

C#
void ClearCellValue()

Creates a border-only cell style from the supplied style attributes.

C#
void CreateBorderCellStyle(ISpreadStreamExportCellStyleInfo cellStyle)
Parameters:cellStyleISpreadStreamExportCellStyleInfo

The style whose borders are used.

Creates a cell at the current row and column position.

C#
void CreateCell()

Creates a cell style from explicit colors, font, alignment, wrapping, and border settings.

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

The cell fill color.

foreColorColor

The text color.

fontFamilyFontFamily

The font family.

fontSizedouble

The font size.

isBoldbool

true to use bold text.

isItalicbool

true to use italic text.

underlinebool

true to underline the text.

textAlignmentContentAlignment

The cell's text alignment.

textWrapbool

true to wrap text in the cell.

borderBoxStyleBorderBoxStyle

The cell border-box style.

borderColorColor

The general border color.

borderTopColorColor

The top border color.

borderBottomColorColor

The bottom border color.

borderRightColorColor

The right border color.

borderLeftColorColor

The left border color.

Creates a renderer-specific style from the supplied lightweight style attributes.

C#
ISpreadStreamExportCellStyleInfo CreateCellStyleFromLightStyle(ISpreadStreamExportCellStyleInfo cellStyle)
Parameters:cellStyleISpreadStreamExportCellStyleInfo

The lightweight style attributes to convert.

Returns:

ISpreadStreamExportCellStyleInfo

The style representation used by the renderer.

Initializes the current cell style from the export renderer's theme.

C#
void CreateCellStyleFromTheme()

Creates a column at the renderer's current column position.

C#
void CreateColumn()

Freezes the specified number of leading rows and columns in the worksheet.

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

The number of leading rows to freeze.

columnsCountint

The number of leading columns to freeze.

Creates a lightweight cell style from explicit colors, font, alignment, wrapping, and border settings.

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

The cell fill color.

foreColorColor

The text color.

fontFamilyFontFamily

The font family.

fontSizedouble

The font size.

isBoldbool

true to use bold text.

isItalicbool

true to use italic text.

underlinebool

true to underline the text.

textAlignmentContentAlignment

The cell's text alignment.

textWrapbool

true to wrap text in the cell.

borderBoxStyleBorderBoxStyle

The cell border-box style.

borderColorColor

The general border color.

borderTopColorColor

The top border color.

borderBottomColorColor

The bottom border color.

borderRightColorColor

The right border color.

borderLeftColorColor

The left border color.

Merges the worksheet cells in the specified rectangular range.

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

The starting row index.

fromColumnIndexint

The starting column index.

toRowIndexint

The ending row index.

toColumnIndexint

The ending column index.

Creates a row at the renderer's current row position.

C#
void CreateRow()

Creates a workbook in the specified stream using the requested file-handling mode.

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

The destination stream for the workbook.

exportFormatSpreadStreamExportFormat

The workbook format.

fileExportModeFileExportMode

How the export handles an existing file or worksheet.

Creates a workbook in the specified stream using the requested format.

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

The destination stream for the workbook.

exportFormatSpreadStreamExportFormat

The workbook format.

Finalizes the current cell.

C#
void FinishCell()

Finalizes the workbook output after the export has written its content.

C#
void FinishExport()

Gets style attributes containing the borders from an existing cell style.

C#
ISpreadStreamExportCellStyleInfo GetBordersFromExistingStyle(ISpreadStreamExportCellStyleInfo cellStyle)
Parameters:cellStyleISpreadStreamExportCellStyleInfo

The style from which to retrieve borders.

Returns:

ISpreadStreamExportCellStyleInfo

Style attributes for the existing borders.

Gets the renderer-specific object for the current cell.

C#
object GetCell()
Returns:

object

Gets the current cell format, creating one if needed; when createNew is true, creates a new format even if one already exists.

C#
object GetCellFormat(bool createNew)
Parameters:createNewbool

true to replace the current format with a new one.

Returns:

object

Gets the style attributes currently associated with the cell.

C#
ISpreadStreamExportCellStyleInfo GetCellStyleInfo()
Returns:

ISpreadStreamExportCellStyleInfo

Gets the renderer-specific object for the current column.

C#
object GetColumn()
Returns:

object

Gets the filename extension associated with an export format.

C#
string GetFileExtension(SpreadStreamExportFormat exportFormat)
Parameters:exportFormatSpreadStreamExportFormat

The format for which to retrieve the extension.

Returns:

string

The extension associated with exportFormat.

Determines whether the specified worksheet cell belongs to a merged range.

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

The row index to check.

columnIndexint

The column index to check.

Returns:

bool

true if the cell is merged; otherwise, false.

Gets the renderer-specific object for the current row.

C#
object GetRow(bool finishCell)
Parameters:finishCellbool

Whether to complete the current cell before retrieving the row.

Returns:

object

Gets the renderer-specific worksheet object for the active worksheet.

C#
object GetWorksheet()
Returns:

object

Assigns the current row to the specified outline level.

C#
void GroupCurrentRow(int level)
Parameters:levelint

The row's outline level.

Sets the current cell's format string and optionally applies it immediately.

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

The format string to assign.

applybool

true to apply the format to the current cell.

Sets the current cell's value with an explicit data type.

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

The type used to interpret the value.

valueobject

The value to write.

Sets the current cell's value from text.

C#
void SetCellValue(string text)
Parameters:textstring

The text to write.

Sets the width of the current column.

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

The column width.

inPixelsbool

true when width is measured in pixels.

Marks the current column as hidden in the exported worksheet.

C#
void SetHiddenColumn()

Marks the current row as hidden in the exported worksheet.

C#
void SetHiddenRow()

Sets the height of the current row.

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

The row height.

inPixelsbool

true when height is measured in pixels.

Advances the current cell position without creating the specified number of cells.

C#
void SkipCells(int count)
Parameters:countint

The number of cell positions to skip.

Advances the current column position without creating the specified number of columns.

C#
void SkipColumns(int count)
Parameters:countint

The number of column positions to skip.