Hi all.
I have a webix_datatable with this column:
…
{ id: “NumVoce”, format:webix.i18n.numberFormat },
…
When I export the datatable in Excel, the number has 2 decimal.
Is it possible to format a number without decimal?
Thanks in advance!
Hi all.
I have a webix_datatable with this column:
…
{ id: “NumVoce”, format:webix.i18n.numberFormat },
…
When I export the datatable in Excel, the number has 2 decimal.
Is it possible to format a number without decimal?
Thanks in advance!
Hi,
do you want to change date format in both DataTable and excel table ?
If yes, you can change format property as in:
...
format:webix.Number.numToStr({decimalSize:0}),
...
If you want to change format only for a column in Excel table, you can customize column configuration in exportToExcel method:
http://docs.webix.com/datatable__export.html#customizingexport
Hi Maria.
I do this:
function exportInExcel(webixId) {
$$(webixId)
.exportToExcel(null, {
columns:{
Id:true,
Agente:true,
Coach:true,
RagioneSociale:true,
NumVoce:{format:webix.i18n.numberFormat}
}
});
}
The field NumVoce is a numeric field (no decimal) and the datatable is OK.
If I use format:webix.i18n.numberFormat in exportToExcel function,
in the Excel file I see the number with the decimals.
If I use format:webix.Number.numToStr({decimalSize:0}) in the excel the number has no decimal.
The problem is that with format:webix.i18n.numberFormat solution the column in excel is formatted as Number (good) but format:webix.Number.numToStr({decimalSize:0}) format the Excel column as text (not good)
Is it possible to export in excel a number without decimals and formatted like number?
Thanks again!