Custom header for excel export


I am working with webix.toExcel method and i am finding it difficult to apply custom style on excel header. I need to bold my header column names, but generally I would like to apply some css class for header column names.
Is that possible?

I did research, but I couldn't find any information I could use to solve my problem.



  • Hello,

    Did you try this?

    webix.toExcel($$("table"), {
  • Yeah, but if I do that then all styles in that datatable that I am trying to export will be applied in excel. I want datatable to be exported just like it is exported when there is styles: false, but only with one change - i want to apply style on header columns names.

    So, I need to write styles: true, and then to remove all styles applied on datatable, and then to add my own css class in some place. :neutral:

  • You can solve it with the help of $exportView

  • Wow, that works.

    Thank you very much. :)

  • edited April 18

    My datatable has filters and when I export it to excel, there is one empty row between headers with columns names and data.

    I am guessing that it is because of filters in datatable, because when I hide all of them, there is no empty row anymore.

    Is there any property on webix.toExcel method that can remove those filters from final document? Can't find any.

    One way is to create on the fly exactly same datatable, except filters in that datatable, and to export that datatable, but that is ugly solution.

  • Hi,

    You can specify the columns as described here

  • Thanks, this was very helpful.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!