SMART datagrid v.1 > Functions

Back  Forward

DataLudi.exportToExcel  Function

Export to Excel file. It is the same as the code below. 

new DataLudi.GridExcelExporter.export(grid, options)

Please refer to GridExcelExporter about more details. 

function exportToExcel (grid: GridBase, options: GridExportOptions|Object);
Returns
Void
Parameters
grid - GridBase. required.
options - GridExportOptions|Object. required.
Code -1
    $('#btnSave').click(function () {
        DataLudi.exportToExcle(grid, {
            target: 'local',
            fileName: 'dlgrid.xlsx'
        });
    });
Code -2
    $('#btnSave').click(function () {
        DataLudi.exportToExcle(grid, {
            url: '/envelope',
            fileName: 'dlgrid.xlsx'
        });
    });
See Also
GridExcelExporter
export
GridExportOptions
Examples
ExcelExporting