Excel header modification

Excel header modification

mortnrmortnr Posts: 5Questions: 2Answers: 0

Hi, I am attempting to modify my table column headings in excel using the 'export options', format.header as per below. However, it isn't working. Is there a way to modify the as-exported column headings?

Thanks & regards,
Nathan

 buttons:[ 
      'load', 
     { extend: 'excel',
        text: "Save as",
        exportOptions: {
             columns: [1,2,3,4,5,6,7,8,9,10],
              format: {
                               //this isn't working....
                                header:  function (data, columnIdx) {
                                return columnIdx + ': ' + data + "blah";
                             }
                           }
                       }
                        },
                   { extend: 'print', exportOptions: {columns: 'visible'} }, 
                   { extend: "edit", editor: editor }, 
                   { extend: "remove", editor: editor },
                   { extend: "create", editor: editor },
                   'colvis' ]
           

           });

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.