Problem with Excel 2007


I'm using Aspose.Cell in an ASP.NET website to create workbooks and open them in IE.

I'm using a handler called Export.ashx and open the workbook with the following code:

workbook.Save("Export.xls", FileFormatType.Excel2000, SaveType.OpenInBrowser, context.Response);

It works well with Excel 2000 and 2003 but with Excel 2007 I've got a message saying that the format of the file I'm trying to open ,"Export.ashx", is different than the one specified by the file's extension and ask for confirmation (sorry my version is in french and I don't have the message in english...). How not to have this warning?



Could you try to change your code to (if it works fine for you):

workbook.Save("Export.xls", FileFormatType.Excel2000, SaveType.OpenInExcel, context.Response);

Thank you.

There is not any warning with SaveType.OpenInExcel but the result is not exactly the same (that's why I guess there are these 2 different options...)

I'd like to make it work with SaveType.OpenInBrowser...


Could you elaborate which different results you get. Please provide us the complete details, you my provide us the sample codes, template excel file(s) etc. We will check it soon.

Thank you.


And for you info, this warning message is a user-notification function that was actually added to Excel 2007. The warning message can help prevent the unexpected problems that might occur due to possible incompatibility issues between the actual content of the file and the file name extension.

I think you may change the Registry settings.
Please check the link

Thank you.

Thank's for the link, it can help dealing with this warning but there is still a strange behaviour with Excel 2007 in OpenInBrowser mode:

Results with IE7 and Excel 2003

OpenInBrowser mode: workbook is opened in IE

OpenInExcel mode: workbook is opened in Excel (you may have to precise if you want to open or save the file, it depends on your parameters)

Results with IE7 and Excel 2007

OpenInBrowser mode: warning due to Excel 2007 + workbook is opened in Excel (not Ok, should be opened in IE)

OpenInExcel mode: same results than Excel 2003


We will get back to explain you soon.

Thank you.


Well, It’s not the problem about Aspose.Cells. Please check the option about MS office and IE settings.

Coming to your resutls Results with IE7 and Excel 2007:

OpenInBrowser mode: Please check the issue in Microsoft support in

OpenInExcel mode: We could not understand “you may have to be precise if you want to open or save the file, it depends on your parameters”. Could you explain it more especially about “your parameters”? We would appreciate if you could give us some snapshot(s) about this issue, we will surely check the issue ASAP.

Thank you.

OpenInBrowser mode: Thank you for this link.

OpenInExcel mode: Everything works well in this mode so I'm not waiting any further answer. The parameter I'm talking about is a security parameter in IE but I can't remember which one, sorry.