I\'m using the following code to load grid data and for removing the HTML from the footer and group footer in Excel. I\'m using the recommended code only but somehow it\'s not w
In your demo, the jQuery text() function is causing a javascript error. Use a regular expression replacement instead:
$("#grid").kendoGrid({
toolbar: ["excel"],
excelExport: function(e) {
var rows = e.workbook.sheets[0].rows;
for (var ri = 0; ri < rows.length; ri++) {
var row = rows[ri];
if (row.type == "group-footer" || row.type == "footer") {
for (var ci = 0; ci < row.cells.length; ci++) {
var cell = row.cells[ci];
if (cell.value) {
if (cell.value.indexOf(" -1) {
var val = cell.value.replace(/<(?:.|\n)*?>/gm, '');
cell.value = val;
}
cell.hAlign = "right";
}
}
}
}
},
excel: {
fileName: "Kendo UI Grid Export.xlsx",
proxyURL: "https://demos.telerik.com/kendo-ui/service/export",
filterable: true
},
Updated DEMO
讨论(0)