Class SpreadStreamExportRenderer
Represents a class which exposes all methods needed to export using RadSpreadStreamProcessing.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.Export
Assembly: TelerikExport.dll
Syntax
public class SpreadStreamExportRenderer : ISpreadStreamExportRenderer
Constructors
SpreadStreamExportRenderer()
Declaration
public SpreadStreamExportRenderer()
Properties
ColumnIndex
Gets or sets the index of the column.
Declaration
public int ColumnIndex { get; set; }
Property Value
System.Int32
The index of the column. |
Implements
RowIndex
Gets or sets the index of the row.
Declaration
public int RowIndex { get; set; }
Property Value
System.Int32
The index of the row. |
Implements
Methods
AddWorksheet(String)
Create and add excel worksheet to the workbook.
Declaration
public virtual void AddWorksheet(string sheetName)
Parameters
System.String
sheetName
Excel workbook. |
Implements
ApplyCellFormat(Object)
Applies the cell format. Note that format needs to be of SpreadCellFormat type in order to be applied to current cell.
Declaration
public virtual void ApplyCellFormat(object format)
Parameters
System.Object
format
The format. |
Implements
ApplyCellStyle(ISpreadStreamExportCellStyleInfo, String)
Applies the cell style.
Declaration
public virtual void ApplyCellStyle(ISpreadStreamExportCellStyleInfo cellStyle, string formatString)
Parameters
ISpreadStreamExportCellStyleInfo
cellStyle
The cell style. |
System.String
formatString
The format string. |
Implements
CallOnWorksheetCreated()
Calls the WorksheetCreated event.
Declaration
public virtual bool CallOnWorksheetCreated()
Returns
System.Boolean
|
Implements
ClearCellValue()
Clears the value of current Cell.
Declaration
public virtual void ClearCellValue()
Implements
CreateBorderCellStyle(ISpreadStreamExportCellStyleInfo)
Creates the border cell style.
Declaration
public virtual void CreateBorderCellStyle(ISpreadStreamExportCellStyleInfo cellStyle)
Parameters
ISpreadStreamExportCellStyleInfo
cellStyle
The cell style. |
Implements
CreateCell()
Creates CellSelection.
Declaration
public virtual void CreateCell()
Implements
CreateCellStyle(Color, Color, FontFamily, Double, Boolean, Boolean, Boolean, ContentAlignment, Boolean, BorderBoxStyle, Color, Color, Color, Color, Color)
Creates a SpreadStreamCellStyleInfo by given visual styles.
Declaration
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
System.Drawing.Color
backColor
BackColor of cell. |
System.Drawing.Color
foreColor
ForeColor of cell. |
System.Drawing.FontFamily
fontFamily
FontFamily of cell. |
System.Double
fontSize
Font size of cell. |
System.Boolean
isBold
Is text bold. |
System.Boolean
isItalic
Is text italic. |
System.Boolean
underline
Is text underlined. |
System.Drawing.ContentAlignment
textAlignment
Text alignment. |
System.Boolean
textWrap
Is text wrapped. |
BorderBoxStyle
borderBoxStyle
Border box style. |
System.Drawing.Color
borderColor
Color of border. |
System.Drawing.Color
borderTopColor
Color of top border. |
System.Drawing.Color
borderBottomColor
Color of bottom border. |
System.Drawing.Color
borderRightColor
Color of right border. |
System.Drawing.Color
borderLeftColor
Color of left border. |
Implements
CreateCellStyleFromLightStyle(ISpreadStreamExportCellStyleInfo)
Creates the cell style from light style.
Declaration
public virtual ISpreadStreamExportCellStyleInfo CreateCellStyleFromLightStyle(ISpreadStreamExportCellStyleInfo cellStyle)
Parameters
ISpreadStreamExportCellStyleInfo
cellStyle
The cell style. |
Returns
ISpreadStreamExportCellStyleInfo
|
Implements
CreateCellStyleFromTheme()
Creates SpreadStreamCellStyleInfo from theme normal style.
Declaration
public virtual void CreateCellStyleFromTheme()
Implements
CreateColumn()
Creates the column.
Declaration
public virtual void CreateColumn()
Implements
CreateFreezePanes(Int32, Int32)
Creates freeze panes.
Declaration
public virtual void CreateFreezePanes(int rowsCount, int columnsCount)
Parameters
System.Int32
rowsCount
Count of frozen rows. |
System.Int32
columnsCount
Count of frozen columns. |
Implements
CreateLightCellStyle(Color, Color, FontFamily, Double, Boolean, Boolean, Boolean, ContentAlignment, Boolean, BorderBoxStyle, Color, Color, Color, Color, Color)
Creates a Telerik.WinControls.Export.SpreadStreamLightCellStyleInfo by given visual styles.
Declaration
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
System.Drawing.Color
backColor
BackColor of cell. |
System.Drawing.Color
foreColor
ForeColor of cell. |
System.Drawing.FontFamily
fontFamily
FontFamily of cell. |
System.Double
fontSize
Font size of cell. |
System.Boolean
isBold
Is text bold. |
System.Boolean
isItalic
Is text italic. |
System.Boolean
underline
Is text underlined. |
System.Drawing.ContentAlignment
textAlignment
Text alignment. |
System.Boolean
textWrap
Is text wrapped. |
BorderBoxStyle
borderBoxStyle
Border box style. |
System.Drawing.Color
borderColor
Color of border. |
System.Drawing.Color
borderTopColor
Color of top border. |
System.Drawing.Color
borderBottomColor
Color of bottom border. |
System.Drawing.Color
borderRightColor
Color of right border. |
System.Drawing.Color
borderLeftColor
Color of left border. |
Implements
CreateMergedCells(Int32, Int32, Int32, Int32)
Creates CellSelection.
Declaration
public virtual void CreateMergedCells(int fromRowIndex, int fromColumnIndex, int toRowIndex, int toColumnIndex)
Parameters
System.Int32
fromRowIndex
From row index. |
System.Int32
fromColumnIndex
From column index. |
System.Int32
toRowIndex
To row index. |
System.Int32
toColumnIndex
To column index. |
Implements
CreateRow()
Creates the row.
Declaration
public virtual void CreateRow()
Implements
CreateWorkbook(Stream, SpreadStreamExportFormat)
Creates new workbook.
Declaration
public virtual void CreateWorkbook(Stream stream, SpreadStreamExportFormat exportFormat)
Parameters
System.IO.Stream
stream
The stream. |
SpreadStreamExportFormat
exportFormat
The export format. |
Implements
CreateWorkbook(Stream, SpreadStreamExportFormat, FileExportMode)
Creates new workbook.
Declaration
public virtual void CreateWorkbook(Stream stream, SpreadStreamExportFormat exportFormat, FileExportMode fileExportMode)
Parameters
System.IO.Stream
stream
The stream. |
SpreadStreamExportFormat
exportFormat
The export format. |
FileExportMode
fileExportMode
The file export mode. |
Implements
FinishCell()
Finishes the cell.
Declaration
public virtual void FinishCell()
Implements
FinishColumn()
Finishes the column.
Declaration
protected virtual void FinishColumn()
FinishExport()
Exports workbook.
Declaration
public virtual void FinishExport()
Implements
FinishRow()
Finishes the row.
Declaration
protected virtual void FinishRow()
FinishWorkbook()
Finishes the workbook.
Declaration
protected virtual void FinishWorkbook()
FinishWorksheet()
Finishes the worksheet.
Declaration
protected virtual void FinishWorksheet()
GetBordersFromExistingStyle(ISpreadStreamExportCellStyleInfo)
Gets the borders from existing style.
Declaration
public virtual ISpreadStreamExportCellStyleInfo GetBordersFromExistingStyle(ISpreadStreamExportCellStyleInfo cellStyle)
Parameters
ISpreadStreamExportCellStyleInfo
cellStyle
The cell style. |
Returns
ISpreadStreamExportCellStyleInfo
|
Implements
GetCell()
Gets current Cell.
Declaration
public virtual object GetCell()
Returns
System.Object
Cell as object. |
Implements
GetCellFormat(Boolean)
Gets current SpreadCellFormat.
Declaration
public virtual object GetCellFormat(bool createNew)
Parameters
System.Boolean
createNew
|
Returns
System.Object
|
Implements
GetCellStyleInfo()
Gets the cell style info.
Declaration
public virtual ISpreadStreamExportCellStyleInfo GetCellStyleInfo()
Returns
ISpreadStreamExportCellStyleInfo
|
Implements
GetColumn()
Gets the column.
Declaration
public virtual object GetColumn()
Returns
System.Object
|
Implements
GetFileExtension(SpreadStreamExportFormat)
Gets file extension.
Declaration
public virtual string GetFileExtension(SpreadStreamExportFormat exportFormat)
Parameters
SpreadStreamExportFormat
exportFormat
Export format. |
Returns
System.String
|
Implements
GetIsMerged(Int32, Int32)
Determines if a cell(by given row and column index) belongs to a merged cell.
Declaration
public virtual bool GetIsMerged(int rowIndex, int columnIndex)
Parameters
System.Int32
rowIndex
The row of cell. |
System.Int32
columnIndex
The column of cell. |
Returns
System.Boolean
A value indicating, whether given cell is part of a merged cell. |
Implements
GetRow(Boolean)
Gets current Row.
Declaration
public virtual object GetRow(bool finishCell)
Parameters
System.Boolean
finishCell
|
Returns
System.Object
Row as object. |
Implements
GetWorksheet()
Gets current worksheet.
Declaration
public virtual object GetWorksheet()
Returns
System.Object
Worksheet as object |
Implements
GroupCurrentRow(Int32)
Groups current row in current worksheet.
Declaration
public virtual void GroupCurrentRow(int level)
Parameters
System.Int32
level
Outline level. |
Implements
OnWorkbookCreated(SpreadStreamWorkbookEventArgs)
Raises the SpreadWorkbookCreated event.
Declaration
protected virtual void OnWorkbookCreated(SpreadStreamWorkbookEventArgs e)
Parameters
SpreadStreamWorkbookEventArgs
e
The SpreadStreamWorkbookEventArgs instance containing the event data. |
OnWorksheetCreated(SpreadStreamWorksheetEventArgs)
Raises the SpreadWorksheetCreated event.
Declaration
protected virtual bool OnWorksheetCreated(SpreadStreamWorksheetEventArgs e)
Parameters
SpreadStreamWorksheetEventArgs
e
The SpreadStreamWorksheetEventArgs instance containing the event data. |
Returns
System.Boolean
|
OnWorksheetExporting(SpreadStreamWorksheetEventArgs)
Raises the SpreadWorksheetExporting event.
Declaration
protected virtual void OnWorksheetExporting(SpreadStreamWorksheetEventArgs e)
Parameters
SpreadStreamWorksheetEventArgs
e
The SpreadStreamWorksheetEventArgs instance containing the event data. |
SetBooleanValue(Object)
Sets the value as boolean.
Declaration
protected virtual bool SetBooleanValue(object value)
Parameters
System.Object
value
The value. |
Returns
System.Boolean
True is the cell value is set, otherwise - false. |
SetCellFormat(String, Boolean)
Sets the cell format.
Declaration
public virtual void SetCellFormat(string formatString, bool apply)
Parameters
System.String
formatString
The format string. |
System.Boolean
apply
The apply. |
Implements
SetCellValue(String)
Sets the value of current CellSelection.
Declaration
public virtual void SetCellValue(string text)
Parameters
System.String
text
Text. |
Implements
SetCellValue(DataType, Object)
Sets the value of current CellSelection.
Declaration
public virtual void SetCellValue(DataType dataType, object value)
Parameters
DataType
dataType
CellSelection data type. |
System.Object
value
Value. |
Implements
SetColumnWidth(Double, Boolean)
Sets the width of current worksheet column.
Declaration
public virtual void SetColumnWidth(double width, bool inPixels)
Parameters
System.Double
width
The width. |
System.Boolean
inPixels
If true, setts the width in pixels, otherwise - in characters. |
Implements
SetDateTimeValue(Object)
Sets the value as date time.
Declaration
protected virtual bool SetDateTimeValue(object value)
Parameters
System.Object
value
The value. |
Returns
System.Boolean
True is the cell value is set, otherwise - false. |
SetHiddenColumn()
Sets current worksheet column as hidden.
Declaration
public virtual void SetHiddenColumn()
Implements
SetHiddenRow()
Sets current worksheet row as hidden.
Declaration
public virtual void SetHiddenRow()
Implements
SetNumberValue(Object)
Sets the value as number.
Declaration
protected virtual bool SetNumberValue(object value)
Parameters
System.Object
value
The value. |
Returns
System.Boolean
True is the cell value is set, otherwise - false. |
SetRowHeight(Double, Boolean)
Sets height of current row in worksheet.
Declaration
public virtual void SetRowHeight(double height, bool inPixels)
Parameters
System.Double
height
Height of row. |
System.Boolean
inPixels
If true, sets the row height in pixels, otherwise - in points. |
Implements
SetStringValue(Object)
Sets the value as string.
Declaration
protected virtual bool SetStringValue(object value)
Parameters
System.Object
value
The value. |
Returns
System.Boolean
True is the cell value is set, otherwise - false. |
SkipCells(Int32)
Skips the cells.
Declaration
public virtual void SkipCells(int count)
Parameters
System.Int32
count
The count. |
Implements
SkipColumns(Int32)
Skips the columns.
Declaration
public virtual void SkipColumns(int count)
Parameters
System.Int32
count
The count. |
Implements
Events
WorkbookCreated
Occurs when the workbook is created. This is suitable place to add and/or modify cell styles.
Declaration
public event SpreadStreamWorkbookEventHandler WorkbookCreated
Event Type
SpreadStreamWorkbookEventHandler
|
WorksheetCreated
Occurs when a new worksheet is created. This is suitable place to set width of columns, add indent/header rows.
Declaration
public event SpreadStreamWorksheetEventHandler WorksheetCreated
Event Type
SpreadStreamWorksheetEventHandler
|
WorksheetExporting
Occurs when a worksheet is about to be exported. This is suitable place to add footer rows.
Declaration
public event SpreadStreamWorksheetEventHandler WorksheetExporting
Event Type
SpreadStreamWorksheetEventHandler
|