Bug of footer and Percentage with 2 decimal place

Bug of footer and Percentage with 2 decimal place

aisenaisen Posts: 1Questions: 0Answers: 0

I want to export xlsx file,and this my code:
html (multiple rows):

AAA
0.02%
0.2%

But only the footer export format is "0.002",the body tag is "0.02%"

        buttons:
            [{
                extend: 'excelHtml5',
                className: 'btn btn-info btn-sm',
                footer: true,
                customize:    
                    function (xlsx) {    
                        var sheet = xlsx.xl.worksheets['sheet1.xml'];
                        $('row c[r^="I"]', sheet).each(function () {    
                            $(this).attr('formatCode', '0.00%'); // it's not working
                            $(this).attr('s', '60'); // it's work, but not I want
                        })
                    }    
             }]

Replies

  • allanallan Posts: 63,213Questions: 1Answers: 10,415 Site admin

    We don't currently automatically apply formatting to the footer elements I'm afraid. That will be addressed in a future version. At the moment you need to use the customize callback much as you are to customise to your needs.

    Allan

This discussion has been closed.