Customize Column Header for Export Excel

Tags: #<Tag:0x00007f0b03ba4180> #<Tag:0x00007f0b1138c458>

how to apply customized column Header for Export Excel file, i am using this code but header background and font color not getting.

exportPlugin.downloadFile(‘csv’, {
exportHiddenColumns: true,

        exportHiddenRows: true,

        columnHeaders: true,

        mimeType: 'text/csv',

        charset: 'utf-8',

        columnDelimiter: ',',

        rowDelimiter: '\r\n',

        columnHeadersCustom: function (index, header) {

            // Customize column headers

            return {

                value: header,

                background: '#002060', // Set the background color

                color: '#FFFFFF', // Set the text color

                alignment: 'left', // Set the text alignment

            };

        },

    });

Hi @kranthikumar.reddy32

We have a method to modify column headers - afterGetColHeader. Here is an example how to use to modify the header: https://jsfiddle.net/handsoncode/v8gxt20e/ You can also inject a HTML there.