Skip to content

AlisherAmonulloev/devextreme-datagrid-copy-datagrid-to-excel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DataGrid for DevExtreme - How to copy data to Excel

This example demonstrates how to copy DataGrid rows into the clipboard for pasting in Excel.

The example implements two different copy actions:

1. Copy row. The command column contains the additional "Copy row" button. Once clicked, the row data will be copied into the clipboard with the appropriate escape characters for Excel.

2. Copy via Export. The onToolbarPreparing event creates the "Copy via Export" button. Both exportDataGrid(options) and customizeCell are used to access the processed data (group, summary, sort, filter, etc.). The data is aggregated into the clipboard with appropriate escape characters for Excel. This method allows you to achieve similar results with the DataGrid's Export to ExcelJS.

You can easily modify the example to achieve different tasks. For example, copy values from a certain column only.

About

An example for copying the datagrid into the user clipboard for copying into Excel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 53.0%
  • TypeScript 24.2%
  • HTML 12.7%
  • Vue 8.6%
  • CSS 1.5%