react-data-export icon indicating copy to clipboard operation
react-data-export copied to clipboard

FEATURE: Make header cell stylable.

Open egertaia opened this issue 7 years ago • 0 comments

My reason:

I Would like for it to be possible to actually style the header cells.

Steps to reproduce:

Make style passable into the header cell. Currently: image Possibility:

function getHeaderCell(v, cellRef, ws, style) {
    var cell = {};
 
    var headerCellStyle = {font: {bold: true}};
    cell.v = v;
    cell.t = 's';
    if(style && style !== undefined){
        cell.s = style;
    } else {
        cell.s = headerCellStyle;
   } 
    ws[cellRef] = cell;
}

And usage is, that you pass in col.style without typechecking, if it is not set, it is undefined, thus defaultstyle (perhaps rename headerCellStyle to defaultStyle) will be applied. As I can't get the whole package to submit the pull request currently, i typed this out on a mobile. I'm sorry if it is not understandable.

Lib Version: Latest

egertaia avatar Oct 29 '18 12:10 egertaia