Free Support Forum -

Opening the generated Excel file prompts an error "Unable to read file."


I am evaluating Aspose.Excel and I like it so far. However, I am having a problem when I set pivot tables to “Refresh on open”. When I do that, I get an error when opening the generated file. The error that appears is “Unable to read file.” This message displays twice, then Excel closes. If I do not set the pivot tables to “Refresh on open” in the designer file, the generated file is fine, but the user has to refresh the data manually. Do you have any suggestions or workarounds for this problem?


Could you please upload your file here? I tested but didn’t find any problem. I uploaded my test file here.
Which version of Aspose.Excel are you using?


It looks like I’m using version of Aspose.Excel. I’m running Windows XP Pro SP 2 (the target server is 2003 server, but I’m developing locally) with Excel 2003 SP1. I am having trouble producing a sample output file which exhibits the problem, but the problem exists in the final production output. The final file contains a sheet with approximately 35,000 rows that is used as the source for the pivot tables (about 20 pivot tables). I would need you to sign a non-disclosure agreement before I could send you the file with real data in it. Is that something you are willing to do?


I have updated Aspose.Excel to version and the problem still exists. I will continue to try to create a sample file to send to you.


Yes. I will sign an NDA as your wish.

And could you try to strip out your data to show this error? Or replace them with some dummy data?

I will send you the NDA when I get it from our legal department - it might take a week or so.


Could you please tell me the following information to make us solving this issue faster?

1. Are these pivot tables created in your template? Do you just change the data at run time?

2. If so, could you please try the following code with your template?

string yourTemplateFile = “…”;
Excel excel = new Excel();

Thank you.


Sorry for the delay in responding.

The pivot tables are created in the template. I am just updating the data at run time.

I tried the code that you suggested, and the error still exists. The template file opens just fine in Excel, but after being passed through Aspose.Excel, it is corrupted in some way.

Is there a way for me to send you a sample file to illustrate the problem - without it being downloadable through the forums?


I now have a sample file that demonstrates the issue. I have attached it to this post.

Running the file I attached above through Aspose.Excel produces the file that I have attached to this post. If you open it, Excel displays the error “Unable to read file” and it exits. You will notice that there is no data in the sample file I submitted - this problem persists regardless of whether there is data in it or not. I have removed the macro and that did not help. Do you know what causes this?


This issue is caused by pivot charts. Generally in MS Excel, a pivot chart is created in a seperated worksheet. In your designer file, you moved those charts into the same worksheet with pivot table.

I fixed this problem. Please try the attached fix.


Sorry for the delay in replying (again). I was on vacation and just returned to work.

I have installed the new dll and it works great.

Thank you for your help.

BTW, we have purchased this product and are now evaluating your Word product.