You can use the Excel Exporter service:
this.excelExportService.exportData
(this.data, ..).
Go ahead and pass a data array
to the service. How to fill the data array with the selected rows data? Here you can find a code snippet for bootstrapping your POC:
Actual code:
public clicked() {
let selectedRows = this.grid1.selectedRows;
for (let rowIndex of selectedRows) {
let rowData = this.grid1.getRowByIndex(rowIndex).rowData;
this.exportData.push(rowData);
}
console.log(this.exportData);
this.excelExportService.exportData(this.exportData,
new IgxExcelExporterOptions("ExportedDataFile"));
this.exportData = [];
}
This Export excel topic will help you any further.
Use this for a starting point with the igxGrid row selection.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…