Excel header modification
Excel header modification
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
This discussion has been closed.
Answers
Can you link to a test case showing the issue please? Also, what version of Buttons are you using?
Allan
Hi...
The example is:
http://clientrisk.azurewebsites.net/Clientside/DataView
The version of buttons is 1.0.3
Regards
Nathan
That's the issue. The option you are using wasn't added until 1.1.0. That should have been in the documentation - apologies for it not being. I've committed a change for that.
Allan
Yes, using 1.1.0 fixed the problem.
Thankyou