I have the Kendo Spreadsheet installed and I can open an Excel file in it using the Open button at the left of the menu toolbar. However, I want to be able to open an Excel file automatically when my ASP.NET MVC page loads. The reason is because there are many large spreadsheets in the file and it swamps the browser when it opens. I want to use Open XML to extract one sheet from the file, save it on the server, then open that one file in the Spreadsheet control. I can do the Open XML part if someone here can tell me how to automatically open the file in client-side jQuery code, I guess.
Steve
7 Answers, 1 is accepted
I have just replied to your other ticket, where this question was posted. For transparency - the approach that we suggest is using the Load method of the Spreadsheet as demonstrated in the following documentation article:
https://docs.telerik.com/aspnet-mvc/helpers/spreadsheet/spreadsheet-processing#load-data-from-external-file
Hope this would help.
Regards,
Nencho
Progress Telerik

Nencho
Thanks, That worked. I will mark the ticket closed but I have one more question. You can answer here or there:
Does that do the same thing (initialize the spreadsheet) as the line "$("#spreadsheet").kendoSpreadsheet();"?
Thank you very much, Steve
@(Html.Kendo().Spreadsheet()
.Name("spreadsheet")
)
Yes, the demonstrated code-snippet is the equivalent for implementation in Razor syntax.
Regards,
Nencho
Progress Telerik

You should use the very same approach in AngularJS scenario - you have to prepare the excel file at your backend and have it accessible with an ajax call (using $http.get). Once requested, the backend should return the file and you have to load it with method of the API of the Spreadsheet:
Exemplary implementation could be found below:
https://dojo.telerik.com/@nenchef/IRABixoh
Hope this would help.
Regards,
Nencho
Progress Telerik

Hi Nencho,
How to open excel file automatic on load page in asp.net core.
Hello, Asad,
You can use the approach that was previously suggested but executed at $(document).ready(function(...)) stage.
Regards,
Nencho
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.