\Kendo\UI\Spreadsheet
A PHP wrapper for Kendo UI Spreadsheet.
Inherits from \Kendo\UI\Widget.
Usage
To use Spreadsheet in a PHP page instantiate a new instance, configure it via the available
configuration methods and output it by echo
-ing the result of the render method.
Using Kendo Spreadsheet
<?php
// Create a new instance of Spreadsheet and specify its id
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
// Configure it
$spreadsheet->activeSheet('value')
// Output it
echo $spreadsheet->render();
?>
Methods
activeSheet
The name of the currently active sheet. Must exactly match one of the (sheet names)[#configuration-sheets.name].
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string
Example
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->activeSheet('value');
?>
change
Triggered when a value in the Spreadsheet has been changed. Introduced in the 2016.Q1.SP1 release. For additional information check the change event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->change('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onChange(e) {
// handle the change event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->change('onChange');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->change(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
changeFormat
Triggered when the range format is changed from the UI. Introduced in the 2017 Q1 release. For additional information check the changeFormat event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->changeFormat('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onChangeFormat(e) {
// handle the changeFormat event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->changeFormat('onChangeFormat');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->changeFormat(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
changing
Triggered when a value or validation in the Spreadsheet is about to be changed upon user interaction. For additional information check the changing event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->changing('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onChanging(e) {
// handle the changing event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->changing('onChanging');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->changing(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
columnWidth
The default column width in pixels.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value float
Example
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->columnWidth(1);
?>
columns
The number of columns in the document.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value float
Example
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->columns(1);
?>
copy
Fired when a range of a sheet is about to be copied. For additional information check the copy event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->copy('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onCopy(e) {
// handle the copy event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->copy('onCopy');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->copy(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
cut
Fired when a range of a sheet is about to be cut. For additional information check the cut event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->cut('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onCut(e) {
// handle the cut event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->cut('onCut');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->cut(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
dataBinding
Fired when the data retrieved from a DataSource is about to be bound to a sheet. Available only if DataSource has been defined for at least one sheet. For additional information check the dataBinding event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->dataBinding('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onDataBinding(e) {
// handle the dataBinding event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->dataBinding('onDataBinding');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->dataBinding(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
dataBound
Fired when the data from a DataSource is already populated in a sheet. Available only if DataSource has been defined for at least one sheet. For additional information check the dataBound event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->dataBound('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onDataBound(e) {
// handle the dataBound event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->dataBound('onDataBound');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->dataBound(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
defaultCellStyle
The default cell styles that will be applied to the sheet cells.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value \Kendo\UI\SpreadsheetDefaultCellStyle|array
Example - using \Kendo\UI\SpreadsheetDefaultCellStyle
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$defaultCellStyle = new \Kendo\UI\SpreadsheetDefaultCellStyle();
$italic = true;
$defaultCellStyle->Italic($italic);
$spreadsheet->defaultCellStyle($defaultCellStyle);
?>
Example - using array
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$italic = true;
$spreadsheet->defaultCellStyle(array('Italic' => $italic));
?>
deleteColumn
Triggered when a column will be deleted. Introduced in the 2017 Q1 release. For additional information check the deleteColumn event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->deleteColumn('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onDeleteColumn(e) {
// handle the deleteColumn event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->deleteColumn('onDeleteColumn');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->deleteColumn(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
deleteRow
Triggered when a row will be deleted. Introduced in the 2017 Q1 release. For additional information check the deleteRow event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->deleteRow('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onDeleteRow(e) {
// handle the deleteRow event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->deleteRow('onDeleteRow');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->deleteRow(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
excel
Configures the Excel export settings of the Spreadsheet.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value \Kendo\UI\SpreadsheetExcel|array
Example - using \Kendo\UI\SpreadsheetExcel
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$excel = new \Kendo\UI\SpreadsheetExcel();
$fileName = 'value';
$excel->fileName($fileName);
$spreadsheet->excel($excel);
?>
Example - using array
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$fileName = 'value';
$spreadsheet->excel(array('fileName' => $fileName));
?>
excelExport
Fires when the user clicks the Export to Excel toolbar button. For additional information check the excelExport event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->excelExport('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onExcelExport(e) {
// handle the excelExport event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->excelExport('onExcelExport');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->excelExport(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
excelImport
Fired when the user imports a file after selecting it from the window prompt. The event is fired before the file importing has finished. For additional information check the excelImport event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->excelImport('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onExcelImport(e) {
// handle the excelImport event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->excelImport('onExcelImport');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->excelImport(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
headerHeight
The height of the header row in pixels.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value float
Example
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->headerHeight(1);
?>
headerWidth
The width of the header column in pixels.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value float
Example
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->headerWidth(1);
?>
hideColumn
Triggered when a column will be hidden. Introduced in the 2017 Q1 release. For additional information check the hideColumn event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->hideColumn('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onHideColumn(e) {
// handle the hideColumn event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->hideColumn('onHideColumn');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->hideColumn(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
hideRow
Triggered when a row will be hidden. Introduced in the 2017 Q1 release. For additional information check the hideRow event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->hideRow('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onHideRow(e) {
// handle the hideRow event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->hideRow('onHideRow');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->hideRow(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
insertColumn
Triggered when a column will be inserted. Introduced in the 2017 Q1 release. For additional information check the insertColumn event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->insertColumn('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onInsertColumn(e) {
// handle the insertColumn event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->insertColumn('onInsertColumn');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->insertColumn(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
insertRow
Triggered when a row will be inserted. Introduced in the 2017 Q1 release. For additional information check the insertRow event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->insertRow('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onInsertRow(e) {
// handle the insertRow event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->insertRow('onInsertRow');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->insertRow(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
insertSheet
Triggered when a sheet is inserted. Introduced in the 2017 Q1 release. For additional information check the insertSheet event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->insertSheet('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onInsertSheet(e) {
// handle the insertSheet event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->insertSheet('onInsertSheet');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->insertSheet(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
paste
Fired when a data is about to be pasted in a sheet. For additional information check the paste event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->paste('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onPaste(e) {
// handle the paste event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->paste('onPaste');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->paste(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
Configures the PDF export settings of the Spreadsheet.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value \Kendo\UI\SpreadsheetPdf|array
Example - using \Kendo\UI\SpreadsheetPdf
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$pdf = new \Kendo\UI\SpreadsheetPdf();
$area = 'value';
$pdf->area($area);
$spreadsheet->pdf($pdf);
?>
Example - using array
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$area = 'value';
$spreadsheet->pdf(array('area' => $area));
?>
pdfExport
Fired when the user initiates the export to PDF. For additional information check the pdfExport event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->pdfExport('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onPdfExport(e) {
// handle the pdfExport event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->pdfExport('onPdfExport');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->pdfExport(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
removeSheet
Triggered when a sheet will be removed. Introduced in the 2017 Q1 release. For additional information check the removeSheet event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->removeSheet('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onRemoveSheet(e) {
// handle the removeSheet event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->removeSheet('onRemoveSheet');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->removeSheet(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
renameSheet
Triggered when a sheet will be renamed. Introduced in the 2017 Q1 release. For additional information check the renameSheet event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->renameSheet('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onRenameSheet(e) {
// handle the renameSheet event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->renameSheet('onRenameSheet');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->renameSheet(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
renderEvent
Triggered after the widget has completed rendering. The event will also fire when a cell is selected or when the Spreadsheet's tools (bold, italic) are used, as the target element is re-generated with new styles (e.g background-color, box-shadow, font-weight, etc.). For additional information check the render event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->renderEvent('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onRender(e) {
// handle the render event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->renderEvent('onRender');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->renderEvent(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
rowHeight
The default row height in pixels.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value float
Example
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->rowHeight(1);
?>
rows
The number of rows in the document.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value float
Example
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->rows(1);
?>
select
Triggered when the Spreadsheet selection is changed. Introduced in the 2017 Q1 release. For additional information check the select event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->select('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onSelect(e) {
// handle the select event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->select('onSelect');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->select(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
selectSheet
Triggered when a sheet will be activated. Introduced in the 2017 Q1 release. For additional information check the selectSheet event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->selectSheet('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onSelectSheet(e) {
// handle the selectSheet event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->selectSheet('onSelectSheet');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->selectSheet(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
addSheet
Adds one or more SpreadsheetSheet to the Spreadsheet.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value[, $value2, ...] \Kendo\UI\SpreadsheetSheet|array
Example - using \Kendo\UI\SpreadsheetSheet
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$sheet = new \Kendo\UI\SpreadsheetSheet();
$activeCell = 'value';
$sheet->activeCell($activeCell);
$spreadsheet->addSheet($sheet);
?>
Example - using array
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$activeCell = 'value';
$spreadsheet->addSheet(array('activeCell' => $activeCell));
?>
Example - adding more than one SpreadsheetSheet
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$first = new \Kendo\UI\SpreadsheetSheet();
$second = new \Kendo\UI\SpreadsheetSheet();
$spreadsheet->addSheet($first, $second);
?>
sheetsbar
A Boolean value which indicates if the sheets-bar will be displayed.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value boolean
Example
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->sheetsbar(true);
?>
toolbar
A Boolean value which indicates if the toolbar will be displayed.Apart from the built-in tools, the Spreadsheet Home, Insert and Data ToolBars fully expose the ToolBar.items API. This way you can specify any custom tools in the widget using the components available in the ToolBar itself:
Returns
\Kendo\UI\Spreadsheet
Parameters
$value boolean|\Kendo\UI\SpreadsheetToolbar|array
Example - using boolean
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->toolbar(true);
?>
Example - using \Kendo\UI\SpreadsheetToolbar
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$toolbar = new \Kendo\UI\SpreadsheetToolbar();
$data = true;
$toolbar->data($data);
$spreadsheet->toolbar($toolbar);
?>
Example - using array
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$data = true;
$spreadsheet->toolbar(array('data' => $data));
?>
unhideColumn
Triggered when a column will be shown. Introduced in the 2017 Q1 release. For additional information check the unhideColumn event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->unhideColumn('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onUnhideColumn(e) {
// handle the unhideColumn event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->unhideColumn('onUnhideColumn');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->unhideColumn(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
unhideRow
Triggered when a row will be shown. Introduced in the 2017 Q1 release. For additional information check the unhideRow event documentation.
Returns
\Kendo\UI\Spreadsheet
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->unhideRow('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onUnhideRow(e) {
// handle the unhideRow event.
}
</script>
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->unhideRow('onUnhideRow');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->unhideRow(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
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
\Kendo\UI\Spreadsheet
Parameters
$value boolean
Example
<?php
$spreadsheet = new \Kendo\UI\Spreadsheet('Spreadsheet');
$spreadsheet->useCultureDecimals(true);
?>