title: Read Excel File From Stream Asp.Net Core WebAPI
body: <p>I'm working with asp.net core webapi and I want to post an excel file from client (using Angular 2) to my Controller. I've read <a href="http://www.talkingdotnet.com/import-export-xlsx-asp-net-core/" rel="nofollow noreferrer">Import Excel example</a> but what they've done is use an existing file. I want to know how can I read an excel file using <strong>IO.Stream</strong>. Thanks for your help.
  I've started read a <strong>.txt</strong> file like this:</p>
  
  <pre><code>public string Post()
      {
          var files = Request.Form.Files;
          if(files != null)
          {
  
              var stream = files[0].OpenReadStream();
              StreamReader reader = new StreamReader(stream);
  
              string result = reader.ReadToEnd();
              int a;
              return result;
          }
          return "";
      }
  </code></pre>