I am using File Helpers and I am unsure how to take my data and export it to an excel file.
I see a tutorial forextracting records but not creating a excel file.
I tried to do this
ExcelStorage provider = new ExcelStorage(typeof(Img));
provider.StartRow = 2;
provider.StartColumn = 1;
provider.FileName = "Customers.xls";
provider.HeaderRows = 6;
provider.InsertRecords(imgs.ToArray()); // imgs was a list before
System.IO.FileNotFoundException was unhandled by user code
Message=Could not load file or assembly 'Interop.Excel, Version=1.3.0.0, Culture=neutral, PublicKeyToken=3e0c08d59cc3d657' or one of its dependencies. The system cannot find the file specified.
Source=FileHelpers.ExcelStorage FileName=Interop.Excel, Version=1.3.0.0, Culture=neutral, PublicKeyToken=3e0c08d59cc3d657
FusionLog==== Pre-bind state information === LOG: User = LOG: DisplayName = Interop.Excel, Version=1.3.0.0, Culture=neutral, PublicKeyToken=3e0c08d59cc3d657 (Fully-specified) LOG: Appbase = LOG: Initial PrivatePath = Calling assembly : FileHelpers.ExcelStorage, Version=2.9.9.0, Culture=neutral, PublicKeyToken=3e0c08d59cc3d657. === LOG: This bind starts in default load context. LOG: Using application configuration file: web.config LOG: Using host configuration file: LOG: Using machine configuration file from machine.config. LOG: Post-policy reference: Interop.Excel, Version=1.3.0.0, Culture=neutral, PublicKeyToken=3e0c08d59cc3d657 LOG: Attempting download of new URL file: LOG: Attempting download of new URL file:Interop.Excel.DLL. LOG: Attempting download of new URL file:Interop.Excel.DLL. LOG: Attempting download of new URL file:Interop.Excel.DLL. LOG: Attempting download of new URL file:Interop.Excel.EXE. LOG: Attempting download of new URL file:Interop.Excel.EXE. LOG: Attempting download of new URL file:Interop.Excel.EXE. LOG: Attempting download of new URL file:Interop.Excel.EXE.StackTrace: at FileHelpers.DataLink.ExcelStorage.InitExcel() at FileHelpers.DataLink.ExcelStorage.InsertRecords(Object[] records) at Index() in Controller.cs:line 37 at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary
2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary
2 parameters) at System.Web.Mvc.ControllerActionInvoker.<>c_DisplayClass15.b_12() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
InnerException: