Possible to reorder Columns during Excel Export?

Posted by: viplav.setia on 1 December 2020, 2:50 am EST

  • Posted 1 December 2020, 2:50 am EST

    Hi Wijmo Team

    Is it possible to reorder Columns after creating the excel workbook object?

    By using ```

    book.sheets[0].columns // is there a new object array we can declare here and change positions according to a condition?

    //Method

    var book = wijmo.grid.xlsx.FlexGridXlsxConverter.saveAsync

    
    If Yes, Please share a snippet.
    
    Thank you in Advance for your support.
  • Posted 3 December 2020, 6:12 pm EST

    Hi Viplav,

    Sorry for the delay in response.

    Moving only the columns in the array will not work because the actual data is stored in the cells array of the WorkbookRow. So, in order to reorder the columns, you will need to move each cell of the row in its new position.

    Please refer to the sample link below for reference:

    https://stackblitz.com/edit/js-tbvssb

    Regards,

    Ashwin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels