title: Read an excel file on asp.net core 1.0
body: <p>Hello I`m trying to upload and read an excel file on my asp.net project but all the documentation I find is for ASP MVC 5.
  My goal is to read the excel sheet and pass the values to an list of objects.</p>
  
  <p>This is my controller, it works for upload the file to my wwwroot/uploads</p>
  
  <pre><code>public class HomeController : Controller
  {
      private IHostingEnvironment _environment;
  
      public HomeController(IHostingEnvironment environment)
      {
          _environment = environment;
      }
  
      public IActionResult index()
      {
          return View();
      }
  
  
  
      [HttpPost]
      public async Task&lt;IActionResult&gt; Index(ICollection&lt;IFormFile&gt; files)
      {
          var uploads = Path.Combine(_environment.WebRootPath, "uploads");
          foreach (var file in files)
          {
              if (file.Length &gt; 0)
              {
                  using (var fileStream = new FileStream(Path.Combine(uploads,    file.FileName), FileMode.Create))
                  {
                      await file.CopyToAsync(fileStream);
                  }
              }
          }
          return View();
      }
  </code></pre>