Hi Morrison,
Thanks for your interest in Syncfusion products.
We suggest you to use “importUrl” property to load the excel file and “ImportMapper” property is used to map the import controller action. Please refer below code snippets.
View.cshtml
@(Html.EJ().Spreadsheet<object>("Spreadsheet")
----------
.ImportSettings(import =>
{
import.ImportMapper("Import");
import.ImportUrl("http://staging.syncfusion.com:7777/ejSpreadsheet/Spreadsheet.xlsx");
})
)
|
Controller.cs
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Import(ImportRequest importRequest)
{
return importRequest.SpreadsheetActions();
}
|
Note: To open local files we can use “File -> Open” option in ribbon.
For your convenience, we have created a simple sample to demonstrate this and same can be downloaded from below link.
Sample Link: http://www.syncfusion.com/downloads/support/forum/123256/ze/SyncfusionMvcApplication1-1474419519
Please let us know if you need any further assistance.
Regards,
Mohankumar R