How to I can start data in row 4 excel, my data only fill row 2

How to I can start data in row 4 excel, my data only fill row 2

rachihirachihi Posts: 1Questions: 1Answers: 0
edited June 2023 in Free community support
$(`#table-request`).DataTable({
                            data: myObj,
                            scrollY: 500,
                            scrollCollapse: true,
                            scrollX: true, 
                            dom: 'l, Bfrtip',
                            buttons: [
                                'copyHtml5', {
                                    extend: 'excelHtml5',
                                    text: 'Excel',
                                    filename: 'report CI',
                                    autoFilter: true,
                                    customize: function (xlsx) {
                                        var sheet = xlsx.xl.worksheets['sheet1.xml'];
                                        $('c[r=A1] t', sheet).text('Custom text');    
                                    },
                                }, 'pdfHtml5'
                            ],
                            columns: columns
                        });

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    There's isn't an option to offset the rows, I'm afraid, so you would need to move each row down manually in the customize function, similar to how you create that custom text.

    Colin

Sign In or Register to comment.