Following the demo: https://demos.telerik.com/aspnet-mvc/treelist/excel-export
We're trying to implement the excel export in our kendo treelist. The issue is that when downloaded, the excel file has no data, just the header of the column.
<%: Html.Kendo().TreeList<A.Models.ExportModel>()
.Name("treelist")
.Columns(columns =>
{
columns.Add().Field(e => e.ACTIVITY).Title("Activity").Width(400);
})
.Toolbar(tools => tools.Excel())
.Excel(excel => excel.FileName("TreeListExport.xlsx").ProxyURL(Url.Action("Excel_Export_Save")))
.DataSource(dataSource => dataSource
.Read(read => read.Action("getActivityData", "ExportActivity"))
.ServerOperation(false)
.Model(m => {
m.Id(f => f.PK);
m.ParentId(f => f.PA);
m.Expanded(true);
m.Field(f => f.ACTIVITY);
})
)
.Height(540)
%>
[HttpPost]
public ActionResult Excel_Export_Save(string contentType, string base64, string fileName)
{
var fileContents = Convert.FromBase64String(base64);
return File(fileContents, contentType, fileName);
}
How can we solve this?
base64before returning the file? - diiN__________