Throw exception When execute the method :excel.worksheet[i].copy


When i use the method :excel.worksheetsIdea [I].copy(worksheet) ,thorw exception:“Arithmetic operation resulted in an overflow”。I can not sure if the aspose.execl control or my template file make the quesion,can you check it for me?

(the attach file is my test code,please unzip it to c:\ to test the question)

thank you very much!


This problem may be caused by repeatedly open the generated file, copying sheets and inserting images. However, your sample code is too complex to figure out the root of the problem.

I changed your code sligtly and now it works fine. I attached it here and your can make a try.


Thank you for your quickly reply,but throw exception

when i open the file .


I will check this problem. Thanks for your patience.


Hi,Laurence,how about my question? what time i can get the answer?

thanks very much!


I am checking on this issue. It’s really complex. Thanks for your patience.


It’s solved. Please try this attached fix.


Thanks for your reply,but it 's regret,the export file can not open yet.the attach file export is here.

thanks very much!


I can open your file without any problem. Which version of MS Excel are you using to open this file?


I use excel2000 to open this file.


It's very odd I can open it successfully in Excel97, Excel2002 and Excel2003 but fail in Excel2000. I will check this problem. And could you please try to see if it's fine in other Excel versions in your place? Thank you.


Try this fix please. I can open generated file in Excel2000 now.


Thanks for your quickly reply,I can not open the generated file in excel2000.I think the perhaps reason is i do not installed the fix for office2000.

I’ll try to do it. Thanks a lot!


Have you tried my latest v3.6.0.3? Please verify to use the latest fix in your project. If you still open your file created with this fix, please post it here.

And please try to open this attached Excel file in your place. It's created with your code.


I’ m sorry for reply you so later because of something imperative。I can open the file you post,

I test with ver,but the export file can not open yet. Attach file is here.

Thanks a lot!


That's odd. I can open your file without any problem. But after closing and re-opening it for several times, it crashed.

Please try this file to see if you can open it successfully.


This is my latest version. I use it to create file with your sample code and didn't find any problem. You can try it.

And if you still find the problem, please find another machine with MS Excel to see if this problem still occurs.


Sorry,I test with ver.,but i can not open the generated file.I find another machine with office2000 system to test,but the result is the same as on my self machine。


I cannot open your file in Excel2000 but can open it in Excel2002 or Excel97. Strange.

Could you open my file in Excel2000?

And please post your code the generate this file here. I will re-check it.


Yes,i can open the file you posted in excel2000,very strange,the generate file can open in excel2000 or excel2003 except excel2000。

My test code is here.