简体   繁体   中英

AG-Grid export using getDataAsExcel

I am using ag grid to export the table refering to this link.

We are able to export using exportDataAsExcel method and downloaded excel sheet is having sheet name as ag grid .

Can we configure the sheet name to something else?

I have also tried using getDataAsExcel method which returns the result as a string rather than download it.

however I am not able to download to excel sheet using getDataAsExcel .

SO basically how can we change sheet name to something else OR is there any other way to export as excel in ag-grid so than sheet name can be configured.

To reproduce we can use same example given in the ag-grid documentation .

You can set the sheet name using the exportDataAsExcel , and passing the sheetName in the params for the function.

There's a demo of setting the sheet name in the documentation here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM