We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

IE 6 opens in browser

Hi

I am using the latest version of Aspose cells. When opening up the Excel file I have created in IE6 the file opens over the top of the browser. It does not give me the option to open and save it.

This works correctly in IE7 and Firefox.

The code I am using is below:

//Save the excel file
workbook.Save("Excel Upload Template" + DateTime.Now + ".xls", FileFormatType.Default, SaveType.OpenInExcel, System.Web.HttpContext.Current.Response);
// End response to avoid unneeded html after xls
Response.End();

Any ideas why this is happening in IE6 and how I can fix it?

Paul

Hi,

Well, I think it might be IE6.0 configuration problem and nothing to do with the Aspose.Cells.

Could you try to run the following code streaming an excel file without involving Aspose.Cells APIs to check if it works fine or you got the similar problem on IE6.0 machine.

FileStream fs1 = new FileStream("d:\\MyFile.xls", FileMode.Open, FileAccess.Read);
byte[] data1 = new byte[fs1.Length];
fs1.Read(data1, 0, data1.Length);
this.Response.ContentType = "application/xls";
Response.AddHeader( "content-disposition","attachment; filename=book1.xls");
Response.BinaryWrite(data1);
Response.End();

Thank you.

Thanks for your help.

I have added the code and the file opens correctly on the IE6 machine. The Aspose Cells file still opens incorrectly in the web browser.

Hi,

Which version of Aspose.Cells you are using, could you try the attached version(latest fix) if it makes a difference.

Thank you.

I have tried the attached version and it didn't make a difference, still opens up in the browser.

The only way I can think around this is to save the created workbook to a stream and then write the file.

Hi,

We don't find the problem on IE6.0 as we tested. We will look into your issue soon.

BTW, could you give us some details regarding your environment, OS, .NET framework, IIS settings etc. or any Http/SSL compressions if you are using.

Thank you.

Hi Amjad

Here are the details of my setup:

OS - Windows Server 2003

.NET 3.5

Nothing special in IIS: Anonymous access/Intergrated windows, Scripts only execute permisison,

Page served over HTTPS standard SSL set-up

Let me know if you require any further details. Do you have an estimated time you will be able to feedback? I have purchased the software for my client and need to give them timings.

Thanks for your help

Paul

Hi,

Well, if you are using HTTPS/SSL, you may try using the following code if it works in your environment there:

Workbook workbook = new Workbook();
//............
//Your code goes here
//.............
//Saves file to memory
MemoryStream stream = new MemoryStream();
workbook.Save(stream, FileFormatType.Default);
response.ContentType = "application/vnd.ms-excel";
//This is same as OpenInExcel SaveType option
response.AddHeader( "content-disposition","attachment; filename=book1.xls");

//This is same as OpenInBrowser SaveType option
//response.AddHeader( "content-disposition","inline; filename=book1.xls");
response.BinaryWrite(stream.ToArray());

And please check for your further reference:

http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net-and-java/httpsssl-issue.html

Thank you.