Find Exceljs Examples and Templates
Use this online exceljs playground to view and fork exceljs example apps and templates on CodeSandbox. Click any example below to run it instantly or find templates that can be used as a pre-built solution!
![overview-devextreme-data-grid-forked](https://codesandbox.io/api/v1/sandboxes/su18m/screenshot.png)
overview-devextreme-data-grid-forkedTo enable export in the DataGrid, reference or import the ExcelJS and FileSaver libraries. Set export.enabled to true.
Once the conditions above are met, use the exportDataGrid(options) method to export the DataGrid to an Excel workbook.
Review the onExporting handler to see the data export code. DataGrid is exported as is to a single worksheet. You can also set allowExportSelectedData to true to export only selected rows.
![Batch Update Request - DevExtreme Data Grid (forked)](https://codesandbox.io/api/v1/sandboxes/zw9c1/screenshot.png)
Batch Update Request - DevExtreme Data Grid (forked)With the DevExtreme DataGrid, users can modify multiple records and submit all changes simultaneously (when editing.mode is set to "batch"). Batch editing allows you to optimize your app, address performance related issues, and deliver the best possible user experience across a variety of usage scenarios.
If data is stored on a server, our DataGrid sends multiple requests to save edited objects - one request per object (this is because most servers only process one edit operation at a time). If your server supports batch update, you can configure the DataGrid to save all changes with a single request.
To incorporate this functionality into your web app, implement the DataGrid's onSaving function. This function accepts an e object that contains fields used for batch update. The following is a summary of the steps you must follow to enable batch update:
Disable default save logic
Set the e.cancel field to true.
Send pending changes to the server
Pending changes are contained in the e.changes array. Ensure it is not empty and send the changes to the server.
Update data in the DataGrid
Once changes are saved, call the refresh(changesOnly) method.
Reset edit state
Use the cancelEditData() method to clear pending changes.