I tried this code in webix
webix.toExcel($$("datatableTab"), {
filename: "Data_Diff",
name: "Name"
});
and it dumped everything in my datatable (datatableTab). But in certain cells I have data like
"<span style='color:blue;'>00000000</span><span style='color:LimeGreen;'>000300EE</span>"
Which I want it to be LHS:00000000,RHS:000300EE
I tried this
filterHTML:true
and it too printed in Excel as 00000000000300EE
How do I customize my Excel cell output?
Links I refered:
- Link for Databable: https://docs.webix.com/api__refs__ui.datatable.html
- Link for toExcel: https://docs.webix.com/datatable__exporttoexcel.html
I think you should try the
columns.templatesetting:In there, use
const htmlFilter = /<[^>]*>/gi;to replace tags with something you need to show instead (or just remove them) and also find and display non-HTML strings in the way that you need. E.g. https://snippet.webix.com/j5vm2f39