Webix datatable email

Is there a way to send webix datatable as it by email ?

Hello @roma,

JavaScript code can’t be placed in email, so you can convert table to html and send it

how to convert webix datatable to html ?

To add a header you can go through the table.config.columns, to add a body you can go through rows through table.eachRow

Hi @roma ,

If you need another solution to converting to HTML as suggested by @NatashaS then you can also export it to PDF or Excel and attach it to an email. You can use the toPDF or toExcel functions.

webix.toPDF($("datatable"),{
     filename: "datatable",
     // other config options
});

webix.toExcel($$("datatable"), {
     filename: "datatable",  // for filename
     name: "xxxxxxx",  // for sheet name
     // more config options
});

@NatashaS thanks it good for me, only if it possible to add webix styles to email. @stefp76 since file is generated how can i added to email (i use standard jQuery ajax call to send email) ?