user15136387
user15136387

Reputation: 13

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.

Upvotes: 1

Views: 2068

Answers (1)

ViqMontana
ViqMontana

Reputation: 5688

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.

Upvotes: 1

Related Questions