0

I have exported the data table data to Excel file. I have added features like borders and exporting all the data to Excel sheet.

Now, I need to export data to the Excel leaving first three rows empty because clients will add their own data. How can I do that?

$('#example2').DataTable({
    responsive: true,
    dom: 'lBfrtip', // 'l' for length menu, 'B' for buttons, 'f' for filter, 'r' for processing display, 't' for table, 'i' for information, 'p' for pagination
    buttons: [

        {
            extend: 'excelHtml5',
            title: '',
            filename: 'report',
            exportOptions: {
                modifier: {
                    selected: null
                }
            },
            customize: function(xlsx) {
                var sheet = xlsx.xl.worksheets['sheet1.xml'];
                $('row c', sheet).attr('s', '25');

            }
        }
    ]

});

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.