Can't save data to outputstream. SpreadsheetDocumentWrapper.Open(stream input,stream output)

Mar 28, 2014 at 6:23 AM
Hi, I want to export excel data to client. the target file have been added 10 rows whose color is blue the same to template file. but there is no data in the 10 rows.
                string strBusinessName = ddlBusiness.SelectedValue;
                string FileName = strBusinessName + "-AllRuns-GridData" + ".xlsx";

                System.Data.DataTable dt = GetGridViewData(gvHcRpt);
                string strPath = Page.MapPath("~\Excel_templates\") + "HC_DataDump" + ".xlsx";

                HttpContext.Current.Response.Clear();
                Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
                this.Response.AddHeader("Content-Disposition", "attachment; filename="+FileName); 

                using (var input = new FileStream (strPath,FileMode.Open,FileAccess.ReadWrite))

                using (SpreadsheetDocumentWrapper myPackage = SpreadsheetDocumentWrapper.Open(input,Response.OutputStream))
                {
                    ExtremeML.Spreadsheet.TableWrapper myTable = myPackage.WorkbookPart.GetTablePart("export_table").Table;
                    myTable.Fill(dt);
                }
                Response.End();