Formulas not being copied when copying worksheets


We are trying to upgrade to Cells version 2.5.1 but have noticed that when we copy worksheets, formulas are not being copied, instead we are seeing #N/A in all cells that had formulas.

Can you help?



Hi Tom,

Thanks for your posting.

Please attach your Source Excel and Output Excel files. We will look into it.


Sorry for the delay, I have knocked up an example of the error and attached the original template excel fiel and the output file. I did a small regression test on your released versions and this error was introduced after aspose cells 2.4.0

here is the code that was used to generate the two files:

Workbook workbook = new Workbook();

Workbook templates = new Workbook();
try {“L:/asposeTest/Template.xls”);
Worksheet templateSheet = templates.getWorksheets().getSheet((“templateSheet”));

workbook.getWorksheets().removeSheet(0);//remove the first sheet

Worksheet addSheet = workbook.getWorksheets().addSheet();
addSheet.setName(“Copied Template Sheet”); FileOutputStream(new File(“L:/asposeTest/outputTemplate.xls”)));

} catch (IOException e) {


After an initial test, I can find the issue as you have mentioned using your sample code and template file. The formulas are not copied correctly in the copied sheet. I have logged your issue into our issue tracking system with an id: CELLSJAVA-24509. We will look into your issue soon.

Thank you.


Please try the attached version Aspose.Cells for Java v2.5.1.5 , we have fixed your issue now.

thank you.


That has fixed it

The issues you have found earlier (filed as 24509) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.