New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Definition

Constructors

C#
public Spreadsheet(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
Parameters:viewContextViewContextinitializerIJavaScriptInitializerurlGeneratorIUrlGenerator

Properties

The name of the currently active sheet. Must exactly match one of the (sheet names)[#configuration-sheets.name].

C#
public string ActiveSheet { get; set; }

The number of columns in the document.

C#
public double? Columns { get; set; }

The default column width in pixels.

C#
public double? ColumnWidth { get; set; }

The default cell styles that will be applied to the sheet cells.

C#
public SpreadsheetDefaultCellStyleSettings DefaultCellStyle { get; set; }

Configures the Excel export settings of the Spreadsheet.

C#
public SpreadsheetExcelSettings Excel { get; set; }

The height of the header row in pixels.

C#
public double? HeaderHeight { get; set; }

The width of the header column in pixels.

C#
public double? HeaderWidth { get; set; }

An object containing any images used in the Spreadsheet. The keys should be image ID-s (they are referenced by this ID in (sheets.drawings)[#configuration-sheets.drawings]) and the values should be image URLs.The image URLs can be eitherdata URLs, in which case the images are fully contained by the JSON, or can be external URLs.Note that when external URLs are used, they should reside on the same domain, or the server must be configured with the properCORS headers, for the Spreadsheet to be able to fetch binary image data using a XMLHttpRequest. If it cannot fetch the image, export to Excel or PDF might not work.

C#
public object Images { get; set; }

Configures the PDF export settings of the Spreadsheet.

C#
public SpreadsheetPdfSettings Pdf { get; set; }

The default row height in pixels.

C#
public double? RowHeight { get; set; }

The number of rows in the document.

C#
public double? Rows { get; set; }

An array which defins the document sheets and their content.

C#
public List<SpreadsheetSheet> Sheets { get; set; }

A Boolean value which indicates if the sheets-bar will be displayed.

C#
public bool? Sheetsbar { get; set; }

A Boolean value which indicates if the toolbar will be displayed.

C#
public SpreadsheetToolbarSettings Toolbar { get; set; }
C#
public IUrlGenerator UrlGenerator { get; }

If set to true, the Spreadsheet formula parser will obey the decimal separator of the current culture. If set to false (default), the decimal separator in formulas will always be the dot.This flag has implications on how formulas are entered. When it is set to true, in cultures where the decimal separator is the comma (,), similar to Excel, the following additional changes upon entering a formula will occur: The semicolon will become a function argument separator. For example, =SUM(A1;A2) instead of =SUM(A1,A2). or The backslash will become an element separator in an array formula. For example, ={1\2;3\4} instead of ={1,2;3,4}.. This flag only affects the presentation - the way formulas are entered by the end user or displayed on screen. Serialization to JSON or XLSX as well as the public API functions will continue to use the dot as decimal separator and the comma as an argument separator (canonical form). For example, to apply a formula by using the API, even if useCultureDecimals is in effect, you still need to use the canonical form.

C#
public bool? UseCultureDecimals { get; set; }

Methods

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

Writes the HTML.

C#
protected override void WriteHtml(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: WidgetBase.WriteHtml(HtmlTextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The writer.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)