Please make sure your template is xlsx format file and you have specified FileFormatType.EXCEL2007 when invoke open() method. If the issue persists, please give us the template file, we will check it soon
Thank you for you quick response. Specifying the file format type resolved the issue. But now I am getting Nullpointerexception in following code part
// get the template worksheet for the leaf node provided. Worksheet templateWorksheet = templateWorkbook.getWorksheets().getSheet(leafNode.getTabType());
// add a new worksheet in the target workbook. Worksheet targetWorksheet = targetWorkbook.getWorksheets().addSheet();
// copy the contents of template worksheet to added worksheet. targetWorksheet.copy(templateWorksheet);
// change the name of added worksheet. targetWorksheet.setName(leafNode.getShortTabName());
I tested your template xlsx file and implemented you scenario. It works fine, I could not reproduce the issue you have mentioned. Which version of Aspose.Cells for Java you are using. Kinldy try the latest fix (1.9.4.10) attached @ the thread: <A href="</A> and let us know if it works fine.</P>
<P>Thank you.</P>