you can follow these steps:
In the Mendix Modeler, open the page containing the data grid that you want to export.
Select the data grid on the page.
In the Properties pane click on the "Export to Excel" button under the "General" section.
In the "Export to Excel" dialog box, you can choose to export all data
You can also give the exported file a name.
Click on the "Export" button to generate the Excel file
The exported file will contain the data from the data grid, including any formatting and column headers.
Datagrid2 currently does not have OOTB excel export. Please refer here for the alternative:
Essentially, for now you need to use the excel exporter module.
Great news! In the latest Data grid 2.0 they've added a new action "- A new "Export_To_Excel" JS action".
With this you can create your own export to Excel button!
go throug the excel exort mendix document ,below link
You cannot be used like datagrid export to excel as by rightclick and add button in datagrid2. Download XLS report from marketplace and do it
I added an an idea about it as well. Give it some love, then it might get implemented faster ;-)