How to edit cells from an excel file from the npm xlsx library

0

I'm exporting some json files to excel, and it's working perfectly, however I wanted the document to already be styled with font color, bold in the header, the link to documentation is: link , I do not know if I am very inexperienced but with the documentation information I am not getting any results.

Function that exports JSON to xlsx:

$scope.gerarExcel = function() {
    /* starting from this data */

    var data = $scope.lista_bolsas;

    for(var i=0; i<data.length; i++) {
        delete data[i].$$hashKey;
    }

    /* generate a worksheet */
    var ws = XLSX.utils.json_to_sheet(data);
    /* add to workbook */
    var wb = XLSX.utils.book_new();
    XLSX.utils.book_append_sheet(wb, ws, "RelatorioProjetosPorAno");

    /* write workbook and force a download */
    XLSX.writeFile(wb, "relatorioprojetosporano.xlsx");
};
    
asked by anonymous 05.03.2018 / 15:54

0 answers