Disclaimer: I'm running an older version of Kendo UI for jQuery, so this may have been fixed. I'd like confirmation if so before updating.
Kendo version: 2017.1.118.545
I am creating a grid from a table data source rather than an endpoint call. Other pages that use endpoints to populate the datasource export Excel with no problems.
Example HTML:
<table class="table table-responsive" id="tblReportSummary">
<colgroup>
<col />
<col />
<col />
<col />
<col />
</colgroup>
<thead>
<tr>
<th data-field="date">Date</th>
<th data-field="totalForStatus">Count</th>
</tr>
</thead>
<tbody>
@foreach (var item in ViewBag.ReportDataSummary as IEnumerable<UtilizationListViewModel>)
{
<tr>
<td>@item.Date</td>
<td>@item.TotalForStatus</td>
</tr>
}
</tbody>
</table>
The jQuery is as follows:
$("#tblReportSummary").kendoGrid({
sortable: true,
toolbar: ["excel"],
excel: {
allPages: true,
fileName: "Utilization Data Export.xlsx"
},
pageable: {
pageSize: 20,
pageSizes: [20, 50, 100]
}
});
When I click Export, all I get is an empty Excel file.
Why isn't the data there, please?