标签:from win log poi doc resize client set blog
for (POIXMLDocumentPart dr : sheet.getRelations()) { if (dr instanceof XSSFDrawing) { XSSFDrawing drawing = (XSSFDrawing) dr; List<XSSFShape> shapes = drawing.getShapes(); for (XSSFShape shape : shapes) { XSSFPicture pic = (XSSFPicture) shape; XSSFClientAnchor anchor = pic.getPreferredSize(); anchor.setAnchorType(ClientAnchor.AnchorType.MOVE_AND_RESIZE); CTMarker ctMarker = anchor.getFrom(); ctMarker.setRow(ctMarker.getRow() + 1); pic.resize(); } } }
标签:from win log poi doc resize client set blog
原文地址:http://www.cnblogs.com/wangtg/p/7806304.html