I want to export datatable to XLSX with webix.toExcel()
The datatable has a lot of columns and many of them are “templated” to customize display.
I want to export in excel using raw values but for some of theses columns, I need a specific template at export time.
So what I need is : when exporting : the default column behavior is to use raw value unless a template is defined.
Sadly, when rawValues:true is defined in toExcel’s options, the custom templates defined in toExcel’s “columns” option aren’t used. It seems that webix “force” rawValues in any case.
So for me the only way is to templatize all columns in toExcel options just to output raw values most of the time.
See snippet: https://snippet.webix.com/enh0jdre
I except the raw export button to export upper cased titles but not rounded rating (raw value with decimals)
webix.toExcel($$('table'), {
rawValues: true,
columns: {
title: {
template: (obj) => {
return obj.title.toUpperCase() // This is never used because of rawValues: true
}
},
rating: true,
}
});
In my opinion this is a bug.