Free Support Forum -

Open Excel file that contain pivot table with IE download dialogbox and open button


We have a problem with Internet Explorer and the Open button on download dialogbox, the file is stored on the cache but renamed like excel(1).xls, so our pivot table are not refresh correctly.

Have you a solution ?



Hi Dominique,

Thanks for considering Aspose.

Well, that's the routine of IE as it appends something like "[1]" to make it as "fileName"+ "[1]"+ ".xls" to the original name and thus nothing to do with Aspose.Cells. Actually Aspose.Cells does not create pivot table report rather sets the pivot data formats and forces MS Excel to create pivot table report and other calculation tasks based on the data source when the workbook opens into MS Excel. So you should use SaveType.OpenInBrowser rather than using SaveType.OpenInExcel. One of the many reason is when you use OpenInExcel option while saving the output generated file into MS Excel at runtime, MS Excel could not parse the Workbook data to generate pivot table report. This is caused by the filename problem (like it adds "[1]" to make "fileName"+ "[1]"+ ".xls" and not like fileName.xls). In short, if a file contains pivot table, it cannot be opened using OpenInExcel SaveType option and this will apply for both i.e., if you create the file from scrach or using any template file for source data to create pivot table report. So, you should use OpenInBrowser SaveType option if the file has pivot table data in it to create pivot table report.

Kindly change your code and update to SaveType.OpenInBrowser if you are using Workbook.Save() method

//Or update to make "inline" if you are using "attachment" option. i.e.,

//Response.AddHeader( "content-disposition","inline; filename=MyBook.xls");

Hope, you will get some insight. Kindly check now if it is fine. If you still find some problems or pivot table does not create fine, feel free to let us know.

Thank you.


We've used :

Response.AddHeader( "content-disposition","inline; filename=MyBook.xls");

It seems that we have no more [1] in the file and the dialogbox name the file correctly "MyBook.xls".

But, i have another trouble now, Excel doesn't see MyBook.xls but the name of the ASP page who retrieve the XLS file.

Excel shows us this message :

"Cannot open PivotTable source file '[DownloadNTPMFile.asp?Id=160]Donnees'"


Dominique BOYER



Are you creating the pivot table report against some hyperlinks with specifying some sort of attributes in the url. Please try to avoid using attributes in the url e.g., "http://abc.asp?Id=5" as it may create the problem you are facing and the pivot won't be rendered fine either.

If you still find some problems, do create a sample test project to show the problem and post us here.

Thank you.

I have exactly the same issues in this posted thread and the best result i can achieve is by removing the querystring values and in the function using SaveType.OpenInBrowser.

The result is that the file is opened with the aspx page name in my case reportresults.aspx, the Pivot Tabel data source works fine but i need to be able to set the name and at least have the extension .xls.

Please can you provide any help to rectify this problem.