Excel export footer

Excel export footer

hojiev@gmail.comhojiev@gmail.com Posts: 8Questions: 1Answers: 0

i want export data to excel with footer

t2.png 47.7K
t1.png 10.8K

Answers

  • hojiev@gmail.comhojiev@gmail.com Posts: 8Questions: 1Answers: 0

    else i need automatic calc for excel formula after exporting to excel

    excel formula =G2+H2+СУММ(J2:U2) after exporting not calced automatic

    3.png 48.2K
  • kthorngrenkthorngren Posts: 21,309Questions: 26Answers: 4,948

    You will need to customize the export if you want to create cells with formulas. Maybe this thread will help:
    https://datatables.net/forums/discussion/41778

    Kevin

  • allanallan Posts: 63,472Questions: 1Answers: 10,467 Site admin

    want export data to excel with footer

    Use the footer option of the excel button type to include the footer.

    Allan

  • hojiev@gmail.comhojiev@gmail.com Posts: 8Questions: 1Answers: 0

    $('#dataTable77').DataTable({
    drawCallback:function() { zSumArr(this,[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21],6); },
    dom: 'Bfrtip',
    buttons: [
    {
    extend: 'excel',
    text: 'Save current page',
    footer: true,
    exportOptions: {
    modifier: {
    page: 'current'
    }
    }
    }
    ],
    "pageLength": 100

    } );

    header:false - is worked , but footer:true can't export footer
    or i must import any lib?
    pls help guys )

  • hojiev@gmail.comhojiev@gmail.com Posts: 8Questions: 1Answers: 0
    edited June 2017

    buttons.html5.min.js
    jszip.min.js
    dataTables.buttons.min.js
    jquery.gritter.js
    jquery.gritter.js
    dataTables.bootstrap.js

  • hojiev@gmail.comhojiev@gmail.com Posts: 8Questions: 1Answers: 0

    buttons.html5.min.js
    jszip.min.js
    dataTables.buttons.min.js
    jquery.gritter.js
    jquery.gritter.js
    dataTables.bootstrap.js

  • allanallan Posts: 63,472Questions: 1Answers: 10,467 Site admin

    Happy to take a look at a test case showing the issue. All you should need to do is add the footer: true option has you have done.

    Allan

  • hojiev@gmail.comhojiev@gmail.com Posts: 8Questions: 1Answers: 0

    it is code correct ?
    but it is still not exported footer

    10.png 192.9K
  • hojiev@gmail.comhojiev@gmail.com Posts: 8Questions: 1Answers: 0
  • kthorngrenkthorngren Posts: 21,309Questions: 26Answers: 4,948

    I built an example for you to start from. I used the Footer Callback example to build a summation in the footer.

    http://live.datatables.net/yesaxili/1/edit

    The example works.

    I'm not sure what the function zSumArr is. Maybe you can update the example to show the problem you are having.

    Kevin

  • hojiev@gmail.comhojiev@gmail.com Posts: 8Questions: 1Answers: 0

    Thank you
    The error was in sumArr

This discussion has been closed.