How do I personalize the excel that I export from my datatable?

0

What I want is to update the excel of my datatatable since it contains all the data except one that I must recover from another side and put it in one of its columns.

Then I want to do the personalization, jquery code for personalization

 $('#MainContent_tabla').DataTable({
            dom: 'Blfrtip',
            buttons: [
                'excelHtml5',
                'pdfHtml5',
              "customize": "_customizeExcelOptions"  
            ],

         var _customizeExcelOptions = function (xlsx) {
             var sheet = xlsx.xl.worksheets['sheet1.xml'];
             var numrows = 5;
             var clR = $('row', sheet);

             //update Row
             clR.each(function () {
                 var attr = $(this).attr('r');
                 var ind = parseInt(attr);
                 ind = ind + numrows;
                 $(this).attr("r", ind);
             });
    
asked by David 22.05.2018 в 23:37
source

0 answers