Hello, I have a simple template 'xls' file which contains one worksheet with an image. I need to clone this sheet. As a result my new sheet gets the image, but the image disappers from original sheet - instead Excel shows me just a placeholder with message 'This image cannot currently be displayed'. I am usinf POI 3.7 and here is the code:
public class ReadTemplate { public static void main(String[] args) { try{ FileInputStream f = new FileInputStream("oamlogo.xls"); Workbook hwb = new HSSFWorkbook(f); Sheet sheet = hwb.cloneSheet(0); hwb.setSheetName(1, "AAA"); FileOutputStream out = new FileOutputStream("clone.xls"); hwb.write(out); out.close(); } catch (IOException e) { System.out.println("IOException: " + e.getMessage()); e.printStackTrace(); } } } How to get the image cloned - or is there any workaround? Thanks --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@poi.apache.org For additional commands, e-mail: user-h...@poi.apache.org