Hi, I am using Infragistics35.WebUI.UltraWebGrid.ExcelExport.v11.1 for exporting to Excel from grid. It is working on my local machine with the default ASP.NET dev server. I use stream to push the excel to the browser. But when moved on production server, it is not working. The prod server uses IIS website. I dont understand why it is not working. Is there anything else to be done? please have a look the code..
In the button click event, i have written:
Infragistics.WebUI.UltraWebGrid.ExcelExport.UltraWebGridExcelExporter exporter = new UltraWebGridExcelExporter();MemoryStream mstream = new MemoryStream(); exporter.Export(uwgReport, mstream);exporter.Export(uwgReport, mstream);byte[] byteArray = mstream.ToArray();mstream.Flush();mstream.Close();
Response.Clear(); Response.ClearContent(); Response.ClearHeaders(); Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename=report.xls");
Response.BinaryWrite(byteArray);
Response.Flush(); Response.End();
Any help anybody could produce would highly be appreciated.
Thanks
Ratheesh
Hi Ratheesh,
I'm just checking if you have been able to resolve your issue or if you still need assistance with the matter.
Hello Ratheesh,
I tested your scenario with the same code you provided but I could not reproduce the issue. I used NetAdvantage v11.1.20111.2178. I would suggest you to upgrade to the latest available version and see if the issue still occurs.