We re having issues with the WebExcelExporter. We are currently using version 11.2.20112.2086 of the ASP.Net controls. When exporting a webdatagrid in IE 9, all works well, the webdatagrid is exported to Excel. In IE8, instead of exporting the webdatagrid to Excel, it is exporting the webdatagrid to aspx rather than Excel.
ASPX Code
<ig:WebExcelExporter ID="WebExcelExporter1" runat="server"
DownloadName="ChargeCodeSummary(FOR OFFICIAL USE ONLY)"
DataExportMode
="AllDataInDataSource">
</ig:WebExcelExporter>
protected void btnExportGrid_Click(object sender, EventArgs e)
{
Infragistics.Documents.Excel.
WorkbookFormat excelFormat = Infragistics.Documents.Excel.WorkbookFormat.Excel2007;
Workbook wBook = new Infragistics.Documents.Excel.Workbook(excelFormat);
Worksheet ws = wBook.Worksheets.Add("Sheet1");
ws.PrintOptions.Footer =
"*** FOR OFFICIAL USE ONLY ***";
ws.PrintOptions.Orientation = Infragistics.Documents.Excel.
Orientation.Landscape;
WebExcelExporter1.Export(
this.wdgReport, wBook.Worksheets["Sheet1"]);
}
Anyone have any ideas what may be happening? Thanks in advance for any assistance. We are stumped.
Hi pobo001,
With some help from Infragistics support I found a workaround to exporting over SSL in IE8. In my case (for IE8 only, I added code to check for the browser version) rather than using the WebExcelExporter I create and populate the Excel file using Infragistics Documents. I save the file to MemoryStream and before writing the file I had to clear the headers. Here's a code example:
MemoryStream ms = new MemoryStream();
workBook.Save(ms);
Response.Buffer = true;
Response.ClearHeaders(); // this is the line I had to add to get it to work
Response.AddHeader("content-disposition", "attachment; filename=fileName.xls");
Response.ContentType ="application/ms-excel";
Response.BinaryWrite(ms.ToArray());
Response.Flush();
Response.End();
I hope this helps. This was a very frustrating issue for me. Also, there may not be a need to forgo using the WebExcelExporter. It may work if you clear the headers prior to exporting. Once I got my solution verified in QA I didn't go back and try it.
-Karen
Is the Problem resolved ? Same issue here..
I realize this is an old post, but I'm experiencing a similar issue in IE8 and thought maybe someone here could help. Exporting the grid was working fine in both IE8 and IE9, until we deployed to production over ssl and exporting in IE8 no longer works. It tries to open the aspx page rather than the xls file. I'm using version 12.2.20122.2054. Any sort of insight is much appreciated.
I've already entered a support request, but I'm not getting a fast enough response so I thought I'd post a question here.
Thanks,
Karen
Excellent. Looking forward to using 12.1!
Hello ksmith36,
The fix is supposed to enter in the next Service Release and in version 12.1 comming later this month.
Next Service Release for ASP.NET product is projected for beginning of May.
You can monitor projected days on the following page - http://ko.infragistics.com/support/service-releases.aspx#ServiceReleases