title: Excel Export using ClosedXML.Excel.dll in ASP.NET MVC
body: <p>Getting error when call GetAllProduct method to export excel data.</p>
  <p>Server Error in '/' Application.
  Could not load file or assembly 'FastMember, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.</p>
  <p><a href="https://i.stack.imgur.com/YhXCl.png" rel="nofollow noreferrer">Error</a></p>
  <pre><code>public void GetAllProduct()
      {
          var dtable = _productmasterService.GetProductMasterData(ManageSession.UserId);
  
          using (XLWorkbook wb = new XLWorkbook())
          {
              wb.Worksheets.Add(dtable);
              Response.Clear();
              Response.Buffer = true;
              Response.Charset = &quot;&quot;;
              Response.ContentType = &quot;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&quot;;
              Response.AddHeader(&quot;content-disposition&quot;, &quot;attachment;filename=List of Products_&quot; + DateTime.Now.Ticks.ToString() + &quot;.xlsx&quot;);
              using (MemoryStream myMemoryStream = new MemoryStream())
              {
                  wb.SaveAs(myMemoryStream);
                  myMemoryStream.WriteTo(Response.OutputStream);
                  myMemoryStream.Position = 0;
                  myMemoryStream.Close();
                  Response.Flush();
                  Response.End();
              }
  
          }
      }
  </code></pre>