Exception of type 'System.OutOfMemoryException' was thrown for just 10000 records
<p>I am getting this error when a user tries to upload data in excel sheet(.xlsx).
Its not a permanent issue. I used to get this issue maybe like once in a week. But today its happening frequently.</p>

<pre><code>    private void ExportToExcelOpenOffice(DataTable dataDump)
    {

        long? empUserId = null;
        bool showTeamData = false;

        if (this.IsUserEntryValid())
        {
            if (CurrentUser.Details.UserType == UserType.User)
            {
                empUserId = CurrentUser.Details.EmployeeUserId;
                showTeamData = true;
            }

            if (dataDump.IsValid(true))
            {
                // ExcelHelper.ToExcel(dataDump, "ELogger_DataDump.xls", this.Response);
                // RichExcelHelper.ToExcel(dataDump, "ELogger_DataDump.xls", this.Response);

                using (ExcelPackage pck = new ExcelPackage())
                {
                    ExcelWorksheet ws = pck.Workbook.Worksheets.Add("Page 1");
                    ws.Cells["A1"].LoadFromDataTable(dataDump, true);

                    //Write it back to the client
                    Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
                    Response.AddHeader("content-disposition", "attachment;  filename=ELogger_DataDump.xlsx");
                    Response.BinaryWrite(pck.GetAsByteArray());
                    Response.Flush();
                    Response.End();
                }

            }
            else
            {
                lblMessage.Visible = true;
                lblMessage.Text = "No records found.";
            }
        }
        else
        {
            lblMessage.Visible = true;
            lblMessage.Text = this.errorMessage;
        }
    }
</code></pre>
