SpreadsheetBuilder

Properties

WriteAction - Func

Methods

BindTo(System.Collections.Generic.IEnumerable)

Binds the Spreadsheet to a collection of SpreadsheetSheet objects.

Parameters

value - System.Collections.Generic.IEnumerable<SpreadsheetSheet>

RETURNS

Returns the current SpreadsheetBuilder instance.

BindTo(System.Collections.Generic.Dictionary)

Binds the Spreadsheet to a dictionary containing the workbook settings.

Parameters

workbook - System.Collections.Generic.Dictionary<String,Object>

The workbook settings

RETURNS

Returns the current SpreadsheetBuilder instance.

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 for Images

RETURNS

Returns the current SpreadsheetBuilder instance.

Example

Razor
 
             @( Html.Kendo().Spreadsheet()
                        .Name("spreadsheet")
                        .Images(new { testImage = "../images/image1.png" })
            )
             

Toolbar(System.Action)

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

Parameters

configurator - System.Action<SpreadsheetToolbarSettingsBuilder>

The configurator for the toolbar setting.

RETURNS

Returns the current SpreadsheetBuilder instance.

Example

Razor
 
             @( Html.Kendo().Spreadsheet()
                        .Name("spreadsheet")
                        .Toolbar(toolbar => toolbar.Home(false))
            )
             

Toolbar(System.Boolean)

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

Parameters

enabled - System.Boolean

Enables or disables the toolbar option.

RETURNS

Returns the current SpreadsheetBuilder instance.

Example

Razor
 
             @( Html.Kendo().Spreadsheet()
                        .Name("spreadsheet")
                        .Toolbar(false)
            )
             

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 for ActiveSheet

RETURNS

Returns the current SpreadsheetBuilder instance.

ColumnWidth(System.Double)

The default column width in pixels.

Parameters

value - System.Double

The value for ColumnWidth

RETURNS

Returns the current SpreadsheetBuilder instance.

Columns(System.Double)

The number of columns in the document.

Parameters

value - System.Double

The value for Columns

RETURNS

Returns the current SpreadsheetBuilder instance.

DefaultCellStyle(System.Action)

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

Parameters

configurator - System.Action<SpreadsheetDefaultCellStyleSettingsBuilder>

The configurator for the defaultcellstyle setting.

RETURNS

Returns the current instance of SpreadsheetBuilder .

HeaderHeight(System.Double)

The height of the header row in pixels.

Parameters

value - System.Double

The value for HeaderHeight

RETURNS

Returns the current SpreadsheetBuilder instance.

HeaderWidth(System.Double)

The width of the header column in pixels.

Parameters

value - System.Double

The value for HeaderWidth

RETURNS

Returns the current SpreadsheetBuilder instance.

Excel(System.Action)

Configures the Excel export settings of the Spreadsheet.

Parameters

configurator - System.Action<SpreadsheetExcelSettingsBuilder>

The configurator for the excel setting.

RETURNS

Returns the current instance of SpreadsheetBuilder .

Pdf(System.Action)

Configures the PDF export settings of the Spreadsheet.

Parameters

configurator - System.Action<SpreadsheetPdfSettingsBuilder>

The configurator for the pdf setting.

RETURNS

Returns the current instance of SpreadsheetBuilder .

RowHeight(System.Double)

The default row height in pixels.

Parameters

value - System.Double

The value for RowHeight

RETURNS

Returns the current SpreadsheetBuilder instance.

Rows(System.Double)

The number of rows in the document.

Parameters

value - System.Double

The value for Rows

RETURNS

Returns the current SpreadsheetBuilder instance.

Sheets(System.Action)

An array which defins the document sheets and their content.

Parameters

configurator - System.Action<SpreadsheetSheetFactory>

The configurator for the sheets setting.

RETURNS

Returns the current instance of SpreadsheetBuilder .

Sheetsbar(System.Boolean)

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

Parameters

value - System.Boolean

The value for Sheetsbar

RETURNS

Returns the current SpreadsheetBuilder instance.

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\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.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 for UseCultureDecimals

RETURNS

Returns the current SpreadsheetBuilder instance.

UseCultureDecimals()

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.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.

RETURNS

Returns the current SpreadsheetBuilder instance.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<SpreadsheetEventBuilder>

The client events action.

RETURNS

Returns the current SpreadsheetBuilder instance.

Example

Razor
 
            @(Html.Kendo().Spreadsheet()
                  .Name("Spreadsheet")
                  .Events(events => events
                      .InsertSheet("onInsertSheet")
                  )
            )
             

ToComponent()

Returns the internal view component.

RETURNS

The instance that represents the component.

Expression(System.String)

Sets the name of the component.

Parameters

modelExpression - System.String

RETURNS

Returns the current instance.

Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)

Sets the name of the component.

Parameters

modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer

RETURNS

Returns the current instance.

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name.

RETURNS

Returns the current instance.

Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with

Parameters

deferred - System.Boolean

RETURNS

Returns a DeferredWidgetBuilder instance.

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

RETURNS

Returns the current instance.

HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The HTML attributes.

RETURNS

Returns the current instance.

ScriptAttributes(System.Object,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Object

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

RETURNS

Returns the current instance.

ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

RETURNS

Returns the current instance.

Render()

Renders the component in place.

ToHtmlString()

Returns the HTML representation of the component.

WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)

Parameters

writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder

ToClientTemplate()

Returns the client template for the component.

AsModule(System.Boolean)

Specifies whether the initialization script of the component will be rendered as a JavaScript module.

Parameters

value - System.Boolean

RETURNS

Returns the current instance.