Posted 06 Nov 2017 Link to this post
va
r
$ = $telerik.$;
var
spreadsheet = $find(
"<%= RadSpreadSheet1.ClientID %>"
);
spreadsheet.save();
This code is not working. No error generated and the spreadsheet is never saved, tough saveAsExcel is working as advertised.
Any hint someone?
Posted 09 Nov 2017 Link to this post
You could create a custom content provider where you need to implement the Save method: http://docs.telerik.com/devtools/aspnet-ajax/controls/spreadsheet/data-binding/providers/custom-database-provider.
Alternatively, as you have already noticed, you can save the file on the client by using the underlying Kendo Spreadsheet widget directly with JavaScript: http://docs.telerik.com/kendo-ui/api/javascript/ui/spreadsheet#methods-saveAsExcel. Something like:
$telerik.$(
"#<%=RadSpreadsheet1.ClientID%>"
).data(
"kendoSpreadsheet"
).saveAsExcel();
Posted 27 Apr 2018 in reply to Rumen Link to this post
Is anyone have fixed this issue? I need to save the excel into server not to client.
Thanks
Posted 27 Apr 2018 Link to this post
If you use the built-in provider, it will read from and write to the designated file in the web application, you can see this in our demos: https://demos.telerik.com/aspnet-ajax/spreadsheet/examples/overview/defaultcs.aspx.
If you need to change that or have an entirely user-generated file, you can follow this KB on saving it on the server without really needing a full custom provider: https://www.telerik.com/support/kb/aspnet-ajax/spreadsheet/details/access-the-spreadsheet-workbook-on-the-server.