Kendo.Mvc.UI.Fluent.SpreadsheetBuilder

Defines the fluent API for configuring the Kendo Spreadsheet for ASP.NET MVC.

Methods

ActiveSheet(System.String)

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

Parameters

value System.String

The value that configures the activesheet.

ColumnWidth(System.Double)

The default column width in pixels.

Parameters

value System.Double

The value that configures the columnwidth.

Columns(System.Double)

The number of columns in the document.

Parameters

value System.Double

The value that configures the columns.

DefaultCellStyle(System.Action<Kendo.Mvc.UI.Fluent.SpreadsheetDefaultCellStyleSettingsBuilder>)

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

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.SpreadsheetDefaultCellStyleSettingsBuilder>

The action that configures the defaultcellstyle.

HeaderHeight(System.Double)

The height of the header row in pixels.

Parameters

value System.Double

The value that configures the headerheight.

HeaderWidth(System.Double)

The width of the header column in pixels.

Parameters

value System.Double

The value that configures the headerwidth.

Excel(System.Action<Kendo.Mvc.UI.Fluent.SpreadsheetExcelSettingsBuilder>)

Configures the Excel export settings of the Spreadsheet.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.SpreadsheetExcelSettingsBuilder>

The action that configures the excel.

Pdf(System.Action<Kendo.Mvc.UI.Fluent.SpreadsheetPdfSettingsBuilder>)

Configures the PDF export settings of the Spreadsheet.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.SpreadsheetPdfSettingsBuilder>

The action that configures the pdf.

RowHeight(System.Double)

The default row height in pixels.

Parameters

value System.Double

The value that configures the rowheight.

Rows(System.Double)

The number of rows in the document.

Parameters

value System.Double

The value that configures the rows.

Sheetsbar(System.Boolean)

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

Parameters

value System.Boolean

The value that configures the sheetsbar.

Toolbar(System.Boolean)

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

Parameters

enabled System.Boolean

Enables or disables the toolbar option.

Toolbar(System.Action<Kendo.Mvc.UI.Fluent.SpreadsheetToolbarSettingsBuilder>)

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

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.SpreadsheetToolbarSettingsBuilder>

The action that configures the toolbar.

UseCultureDecimals(System.Boolean)

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;3} 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.To make the API functions obey useCultureDecimals, wrap your code in a call to sheet.withCultureDecimals. Assuming a culture where the comma is used for decimals, compare the previous example with the following one.

Parameters

value System.Boolean

The value that configures the useculturedecimals.

Sheets(System.Action<Kendo.Mvc.UI.Fluent.SpreadsheetSheetFactory>)

An array defining the document sheets and their content.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.SpreadsheetSheetFactory>

The action that configures the sheets.

Images(System.Object)

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.

Parameters

value System.Object

The value that configures the images.

Events(System.Action<Kendo.Mvc.UI.Fluent.SpreadsheetEventBuilder>)

Configures the client-side events.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.SpreadsheetEventBuilder>

The client events action.

Example (ASPX)

<%= Html.Kendo().Spreadsheet()
    .Name("Spreadsheet")
    .Events(events => events
        .Render("onRender")
    )
%>
In this article
Not finding the help you need?