Is it possible to combine two properties of an object of data in Ag Grid while exporting to excel

Viewed 22

I have a data like this for the grid

[
    {
       a: 123.0,
       delta: 2
    },
    {
       a: 46,
       delta: -5.1
    }
]

I wanted to show this information in excel as in the below screenshot in a single cell

enter image description here

For Ag grid browser rendering, I am using cellRenderer which helped me to render as I want but could not find any option for excel export.

1 Answers

use below code in excelStyles

{
  id: 'twoDecimalPlaces',
  numberFormat: {
  format: '[Green]0.00% ▲;[Red] 0.00% ▼',
  },
},

here is the working demo.

Related