We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

XlsIO SaveAs.(filename, Response, ExcelDownloadType) -> Error.

Hello,

I created a workbook with the version property as Excel2007.
When you call the SaveAs method browser (Firefox) sends me a dialog with the Open and Save options.
If I choose the "Save" Excel is saved correctly with the name "filename.xlsx" and looks correctly.
If I choose the "Open" Excel does not open, and change the file extension "filename.xlsx.xls"

Please help.

Thanks!

12 Replies

AV Abirami Varadharajan Syncfusion Team April 26, 2016 06:51 AM UTC

Hi Anibal, 
 
We are able to reproduce the issue. We recommend you to set ExcelHttpContentType parameter while saving the workbook to resolve this issue. Kindly refer the below code to achieve this. 
 
Code example: 
 
workbook.SaveAs("Output.xlsx", ExcelSaveType.SaveAsXLS, Response, ExcelDownloadType.Open,ExcelHttpContentType.Excel2013); 
 
 
 
 
We have shared the sample for your reference which can be downloaded from the following link. Kindly refer this and let us know if this helps. 
 
 
Please let us know if you have any concerns. 
 
Regards, 
Abirami. 



AD Anibal Díaz April 26, 2016 07:38 AM UTC

Thanks, works perfect!


AV Abirami Varadharajan Syncfusion Team April 27, 2016 07:22 AM UTC

Hi Anibal, 
  
We are glad to know that the issue has been resolved at your side. Please let us know if you need any further assistance on this. 
  
Regards, 
Abirami. 



AD Anibal Díaz June 2, 2016 02:54 PM UTC

Hello,

This solution on InternetExplorer11 don't work

Any may help me?

Thanks


AV Abirami Varadharajan Syncfusion Team June 3, 2016 11:00 AM UTC

Hi Anibal, 
 
We are unable to reproduce the reported issue from our side. We have shared a screen capture video for your reference which can be downloaded from the following link.  
  
 
Please share us the issue reproducing sample along with screen capture video and machine culture information which will be helpful for us to provide prompt solution at the earliest. 
 
Please let us know if you have any concerns. 
 
Regards, 
Abirami. 



AD Anibal Díaz June 3, 2016 12:25 PM UTC

I created a workbook with the version property as Excel2007.
With InternetExplorer11, when I call to SaveAs method, appear dialog with the Open and Save options.

If I choose the "Save" Excel is saved correctly with the name "filename.xlsx" and looks correctly.
If I choose the "Open" Excel does not open, and change the file name and extension to "MyExcelExportPage.aspx"


AD Anibal Díaz June 6, 2016 08:22 AM UTC

My code example is this...

Attachment: ExcelIE11_1b61db20.rar


VS Vikas Sekar Syncfusion Team June 6, 2016 01:56 PM UTC

Hi Anibal, 
 
The reported behavior in downloading excel file in Internet explorer is due to interruption in HttpResponse.End method or Browser customization. We have created very basic sample to illustrate this behavior in below link. 
 
 
Please lets us know whether you are facing the same issue in above sample.  
 
Regards, 
Vikas 



AD Anibal Díaz June 6, 2016 02:13 PM UTC

Hello Abirami,

Thanks for you reply.
The issue is same before.
I attach capture of screen.

Regards.

Attachment: Result_9effa9b.rar


AV Abirami Varadharajan Syncfusion Team June 7, 2016 04:03 PM UTC

Hi Anibal, 
 
Solution 1: 
 
As a workaround, we have closed the response header in a different way. Please try the below sample and let us know whether the issue is resolved or not. 
 
 
Note: we have made use Response.Flush() and Close() 
 
Solution 2: 
 
The issue which you are facing is not due to XlsIO control, It is due to interruption in HttpResponse.End() at your browser(As mentioned in our previous update). 
 
We recommend you to reset the Internet Explorer settings and check whether the issue is getting resolved. Kindly follow the below steps for resetting. 
 
  1. Close all Internet Explorer and Windows Explorer windows that are currently open.
  2. Reopen Internet Explorer.
  3. Click the Tools button, and then click Internet options.
  4. Click the Advanced tab, and then click Reset.
  5. In the Reset Internet Explorer Settings dialog box, click Reset.
 
Please let us know if you have any concerns. 
 
Regards, 
Abirami. 



AD Anibal Díaz June 8, 2016 08:34 AM UTC

Hello Abirami,

The workaround 1 is fine, thanks!

Best regards.


AV Abirami Varadharajan Syncfusion Team June 9, 2016 09:26 AM UTC

Hi Anibal,  
 
Thank you for updating us. 
   
We are glad to know that the issue has been resolved at your side. Please let us know if you need any further assistance on this.  
   
Regards,  
Abirami. 


Loader.
Live Chat Icon For mobile
Up arrow icon