This is a migrated thread and some comments may be shown as answers.

Export to Excel proxy not called

1 Answer 536 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 20 Mar 2019, 04:00 PM

I have a grid that has

.Excel(excel => excel
.FileName("Global Agenda Dashboard Grid.xlsx") 
.Filterable(true)
        .ProxyURL(Url.Action("Export", "Excel"))
.AllPages(true)

I have a Excel controller and in there a method

[HttpPost]
public ActionResult Export(string contentType, string base64, string fileName)
{
var fileContents = Convert.FromBase64String(base64);

return File(fileContents, contentType, fileName);
}

But as far as I can tell this function is not getting called, but the export is happening. Ideas?

1 Answer, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 21 Mar 2019, 02:11 PM
Hi Kevin,

Generally, the proxy URL is used when the file cannot be serialized on the client and cannot be saved locally. However, if you would like to always hit the proxy URL, enable the forceProxy property.

.Excel(excel => excel
    .FileName("Global Agenda Dashboard Grid.xlsx")
    .Filterable(true)
    .ForceProxy(true)
    .ProxyURL(Url.Action("Export", "Excel"))
    .AllPages(true))


Best regards,
Tsvetomir
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Kevin
Top achievements
Rank 1
Answers by
Tsvetomir
Telerik team
Share this question
or