Hi,
I have the grid looking exactly as desired,currency format right aligned and the documentation states that
Column Templates
Kendo UI Grid doesn't use column templates during Excel export - it exports only the data. The reason is simple - a column template may contain arbitrary HTML which can't be converted to Excel column values.
The format option is not used during export. Check Column Format for more info.
The template option is not used during export. Check Column Templates for more info.
my code
columns: [
{command: ["edit"], title: " ", locked: true, width: "80px"},
{field: "invAmt", width: 120, template: "#= kendo.toString(invAmt, 'C') #" , title: "invAmt", filterable: {cell: {showOperators: false}},
aggregates: ["sum"], aggregates: ["sum"],
groupHeaderTemplate: "Total Count: #=sum#",
footerTemplate: "<div class='ra'>#= kendo.toString(sum, 'C') #</div>",
groupFooterTemplate: "<div class='ra'>#= kendo.toString(sum, 'C') #</div>"
},
{field: "paidAmt", width: 120, template: "<div class='ra'>#= kendo.toString(paidAmt, 'C') #</div>" , title: "<div class='ra'>paidAmt</div>", filterable: {cell: {showOperators: false}},
aggregates: ["sum"], aggregates: ["sum"],
groupHeaderTemplate: "Total Count: #=sum#",
footerTemplate: "<div class='ra'>#= kendo.toString(sum, 'C') #</div>",
groupFooterTemplate: "<div class='ra'>#= kendo.toString(sum, 'C') #</div>"
},
{field: "savings", width: 120, template: "<div class='ra'>#= kendo.toString(savings, 'C') #</div>" , title: "<div class='ra'>savings</div>", filterable: {cell: {showOperators: false}},
aggregates: ["sum"], aggregates: ["sum"],
groupHeaderTemplate: "Total Count: #=sum#",
footerTemplate: "<div class='ra'>#= kendo.toString(sum, 'C') #</div>",
groupFooterTemplate: "<div class='ra'>#= kendo.toString(sum, 'C') #</div>"
},
yet the following gets exported to excel.
<div
class='ra'>invAmt</div>
333
250
500
0
0
0
0
<div
class='ra'>$1,083.00</div>
<div
class='ra'>$1,083.00</div>
I guess I'm reading it wrong?
TIA
John