title: How do I save an ExcelPackage to a local path without opening Excel?
body: <p>I'm trying to output a ExcelPackage created using EPPLUS to a file path without Excel actually opening up the file. I've got the below code right now...what am I doing wrong? Thanks.</p>
  
  <pre><code> Dim FileName As String = "C:\Temp\" + CurrAcct + ".xlsx"
   Dim Result As New MemoryStream()
   xlPackage.SaveAs(Result)
   Context.Response.Clear()
   Context.Response.ContentType = "application/vnd.openxmlformats-      officedocument.spreadsheetml.sheet"
   Context.Response.AddHeader("Content-Disposition", "attachment;filename=" + FileName + ".xlsx")
   Result.WriteTo(Context.Response.OutputStream)
   Context.Response.End()
  </code></pre>