I am receiving the following error when attempting to export my grid to Excel. Can you help me figure out what I'm missing?
$("#dashboard").ejGrid({
allowReordering: true,
allowMultiSorting: true,
allowPaging: true,
allowSorting: true,
allowFiltering: true,
allowTextWrap: true,
allowResizing: true,
allowHiding: true,
cellSelecting: "dbCellSelect",
selectionSettings: { allowSelection: true, selectionType: "single", cellSelecting: "dbCellSelect", selectionMode: [ej.Grid.SelectionMode.Cell] },
unHideColsOnDblClick: true,
ExportToExcelAction: "@Url.HttpRouteUrl("Default", new { controller = "Dashboard", action = "ColumnTemplateExportToExcel" })",
toolbarSettings: { showToolbar: true, toolbarItems: [ej.Grid.ToolBarItems.Search, ej.Grid.ToolBarItems.ExcelExport] },
mappers: { ExportToExcelAction: "@Url.HttpRouteUrl("Default", new { controller = "Dashboard", action = "ColumnTemplateExportToExcel" })" },
pageSettings: { pageSize: 5, pageSizeList: [5, 25, 50] },
filterSettings: { filterType: "Menu" },
columns: [
{ field: "Column1", headerText: "Column1", textAlign: ej.TextAlign.Left, visible: false },
{ field: "Column2", headerText: "Column2", textAlign: ej.TextAlign.Left, visible: !columnsHidden.includes('@HideColumn2') },
{ field: "Column3", headerText: "Column3", textAlign: ej.TextAlign.Left, visible: !columnsHidden.includes('@HideColumn3') },
{ field: "Column4", headerText: "Column4", textAlign: ej.TextAlign.Center, template: true, templateID: "#Column4Template", visible: !columnsHidden.includes('@HideColumn4') },
{ field: "Column5", headerText: "Column5", textAlign: ej.TextAlign.Left, visible: !columnsHidden.includes('@HideColumn5') },
{ field: "Column6", headerText: "Column6", textAlign: ej.TextAlign.Left, template: true, templateID: "#Column6Template", visible: false },
{ field: "Column7", headerText: "Column7", textAlign: ej.TextAlign.Left, visible: !columnsHidden.includes('@HideColumn7') },
{ field: "Column8", headerText: "Column8", textAlign: ej.TextAlign.Center, template: true, templateID: "#Column8Template", visible: !columnsHidden.includes('@HideColumn8') },
{ field: "Column9", headerText: "Column9", textAlign: ej.TextAlign.Center, template: true, templateID: "#Column9Template", visible: !columnsHidden.includes('@HideColumn9') },
{ field: "Column10", headerText: "Column10", textAlign: ej.TextAlign.Left, visible: !columnsHidden.includes('@HideColumn10') },
{ field: "Column11", headerText: "Column11", textAlign: ej.TextAlign.Left, visible: !columnsHidden.includes('@HideColumn11') },
{ field: "Column12", headerText: "Column12", textAlign: ej.TextAlign.Center, template: true, templateID: "#Column12Template", visible: !columnsHidden.includes('@HideColumn12') },
{ field: "Column13", headerText: "Column13", textAlign: ej.TextAlign.Left, visible: false },
{ field: "Column14", headerText: "Column14", textAlign: ej.TextAlign.Left, visible: false },
{ field: "Column15", headerText: "Column15", textAlign: ej.TextAlign.Left, visible: false },
{ field: "Column15", headerText: "Column15", textAlign: ej.TextAlign.Left, visible: false }
],
sortSettings: { sortedColumns: [{ field: "Column3", direction: "descending" }, { field: "Column4", direction: "ascending" }] }
});