https://issues.apache.org/bugzilla/show_bug.cgi?id=49423
Yegor Kozlov <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID Severity|blocker |normal --- Comment #6 from Yegor Kozlov <[email protected]> 2011-03-28 03:51:16 EDT --- HSSF provides a way to iterate over shapes and read their positions. The following code works fine to me: HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream(file)); int numSheets = workbook.getNumberOfSheets(); for (int i = 0; i < numSheets; i++) { HSSFSheet sheet = workbook.getSheetAt(i); List<HSSFShape> shapes = sheet.getDrawingPatriarch().getChildren(); for(HSSFShape shape : shapes){ HSSFAnchor anchor = shape.getAnchor(); if(anchor instanceof HSSFClientAnchor){ // absolute coordinates HSSFClientAnchor clientAnchor = (HSSFClientAnchor)anchor; System.out.println(clientAnchor.getRow1() + "," + clientAnchor.getRow2()); } else if (anchor instanceof HSSFChildAnchor){ // shape is grouped and the anchor is expressed in the coordinate system of the group HSSFChildAnchor childAnchor = (HSSFChildAnchor)anchor; System.out.println(childAnchor.getDy1() + "," + childAnchor.getDy2()); } } } If this code misses some images then please attach the problem file and a junit demonstrating what particular is missing. Yegor -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
