How to modify CSS of Header in export files? Also How to add empty row after Header in Export?
How to modify CSS of Header in export files? Also How to add empty row after Header in Export?
Hello,
I am using Datatable Buttons extension and i want to modify Header with background color ,bold text and font color. I tried below code but not working
format: {
//this isn't working....
header: function (data, columnIdx) { console.log(data);
data = '<b>'+data+'</b>';
return data;
}
}
Also How to add empty row after header in xls or CSV? Thanks
Replies
Hi,
In the current release of Buttons there is no option to add formatted to the created XSLX file. That will change with the 1.2 release that is currently being worked on and will include a couple of examples demonstrating how you can use the XML options given by XSLX to format cells.
Likewise, it is not currently possible to add an extra row to the header in XSLX, but it should be quite possible using the
customize
callback method of thecsvHtml5
button type. You could, for example, simply replace the first\n
character with two new line characters.Regards,
Allan