Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
120
WebExcelExporter Exports to .aspx page and not Excel file
posted

I am using a WebDataGrid and trying to export the data via the WebExcelExporter. I am using Infragistics 4 v11.2. Whenever the data is exported, the file dialog has a type of ASP.NET page instead of Excel. I can change the file manually from an .aspx page to an Excel file, but that will not work for normal users. My code is about as simply as you can get. The WebDataGrid is named wdgCustomers witch is very basic and has AIJAX disabled. Here are my WebExcelExporter settings:

HTML:

<ig:WebExcelExporter ID="ExcelExportCust" runat="server" 

WorkbookFormat="Excel2007" DownloadName="Customers"></ig:WebExcelExporter>

  

Code behind on click handler of export to excel button:
 

protected void btnExportCustExcel_Click(object sender, EventArgs e)

{

ExcelExportCust.Export(wdgCustomers);

}

 

Here is the download prompt I receive:

I noticed I had a warning that a reference to Infragistics4.WebUI.Documents.Excel.v11.2 was missing in my project. I added that to my Web, but that did not remedy the issue.

Please help!

Thanks,

Eric