Hi there,
I am currently using Java Aspose Cell 7.0.4. Here is the code snipped:
License license = new License();
license.setLicense("/tmp/aspose.cells.lic");
Workbook workbook = new Workbook("/tmp/CurveSheet.xls", new LoadOptions(LoadFormat.EXCEL_97_TO_2003));
List sheetNames = Arrays.asList(“Sheet 1”, “Sheet 2”);
for (String sheetName : sheetNames) {
int newSheetIndex = workbook.getWorksheets().addCopy(“TEMPLATE”);
Worksheet newSheet = workbook.getWorksheets().get(newSheetIndex);
newSheet.setName(sheetName);
}
// [MARK]
// workbook.getWorksheets().removeAt(“TEMPLATE”);
workbook.save("/tmp/mod_curvesheet.xls", new XlsSaveOptions(SaveFormat.EXCEL_97_TO_2003));
If I run this code, the generated workbook is working fine. Now, if I un-comment the code under [MARK], then generated workbook is actually having a problem. Problem is that any changes to the cell in Sheet 2 is actually reflect to Sheet 1.
Note: to re-produce this problem, you have to load the aspose license.
Look forward for your help