Export button make incorrect order in headers

Export button make incorrect order in headers

NIkflipflopNIkflipflop Posts: 3Questions: 2Answers: 0

Export button Headers wrong order if use columns order in revert order

 buttons: [
        {
         extend: 'excelHtml5',
         exportOptions: {
             columns: [2,1 ],
             stripNewlines: false,
             orthogonal: "export"

         },
     }
 ],

Will result

Header 1, Header 2
Value 2, Value 1

Order 1.* version all work correct

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    The export will happen with the columns in the order that they are in the DataTable, not the order of the columns array for the button. That is how the columns selector operates.

    Allan

  • NIkflipflopNIkflipflop Posts: 3Questions: 2Answers: 0

    But value come in same order like columns instead header,

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    Oh - I had missed that. Thanks for the follow up. I'll take a look into it next week.

    Allan

Sign In or Register to comment.