I have referenced Telerik.Web.Spreadsheet.dll and want to import an uploaded xslx to a spreadsheet in a asp.net mvc view.
I'm following this demo: http://demos.telerik.com/aspnet-mvc/spreadsheet/server-side-import-export
My code:
[HttpPost]
public ActionResult Upload(HttpPostedFileBase file)
{
var workbook = Telerik.Web.Spreadsheet.Workbook.Load(file.InputStream, Path.GetExtension(file.FileName));
return Content(workbook.ToJson(), Telerik.Web.Spreadsheet.MimeTypes.JSON);
}
The line " var workbook = Telerik.Web.Spreadsheet.Workbook.Load(file.InputStream, Path.GetExtension(file.FileName));" throws the following error:
InnerException {"Could not load file or assembly 'Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml, Version=2017.1.109.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The system cannot find the file specified.":"Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml, Version=2017.1.109.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7"} System.Exception {System.IO.FileNotFoundException}
then I add Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.dll and get a similar exception for Telerik.Windows.Documents.Core.dll.
then I add Telerik.Windows.Documents.Core.dll and get a new exception type:
($exception).InnerException {"Could not load file or assembly 'Telerik.Windows.Documents.Core, Version=2017.1.109.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"Telerik.Windows.Documents.Core, Version=2017.1.109.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7"} System.Exception {System.IO.FileLoadException}
What dll's must I reference (and how) in a asp.net mvc project?
/Morten