SMART datagrid v.1 > Examples

[ grids ver.1.3.5]   Back  Forward

Async Excel Exporting  Example

Depending on system performance, it may take a long time to convert large amounts of the grid data to an Excel file. Since JavaScript UI runs in a single thread, UI may stop if the work of creating Excel file takes a long time. 

In order to respond to this problem, SMART datagrid can do excel exporting in an asynchronous style. If GridExportOptions.async is specified as true (the default value), Excel conversion operations will run by being divided into small operation units, and the specified Callback will be called in each run time to run the background UI operation such as the progress bar. 

In addition, if showProgress is true (the default value), the progress bar will be automatically displayed when run asynchronously, and if cancelable is true, "Cancel" button will be displayed. If click "Cancel" button, the export work will be stopped. modal specifies whether the user can approach the grid during displaying the progress bar. If specify as true, a translucent mask will be covered on the grid and the user will not be able to click it. 

Grid - 1
rows

Add 5000 rows at a time. 

Excel exporting operations can be divided into two parts. One is to create the grid data to an Excel sheet, and the other is to compress the created Excel file to a zip file. Although the work of creating Excel sheet has been implemented in SMART datagrid module, the compression work is using JSZip. Similarly, as creating an Excel sheet, if the event of each compression stage is required in asynchronous mode, you should use a version above JSZip 3. 

Please refer to Async zip Example

View Source JSP 

See Also
GridExportOptions.async
GridExportOptions.showProgress
GridExportOptions.title
GridExportOptions.onStart
GridExportOptions.onFinished
GridExportOptions.onProgress
Examples
Excel Exporting
Dynamic Styles Exporting
Progress Bar