Package org.apache.poi.xssf.usermodel

Examples of org.apache.poi.xssf.usermodel.XSSFClientAnchor


      short column = (short) image.getColumn();
      //int width = Math.abs(image.getWidth());
      //int height = Math.abs(image.getHeight());

      int index = workbook.addPicture(bytes, type);
      XSSFClientAnchor anchor = new XSSFClientAnchor(0, 0, 0, 0, row, column, row, column);

      XSSFDrawing drawing = s.createDrawingPatriarch();
      XSSFPicture picture = drawing.createPicture(anchor, index);

      picture.resize();
View Full Code Here


    row.setHeight((short) (50 * entity.getHeight()));
    row.createCell(i);
    ClientAnchor anchor = workbook instanceof HSSFWorkbook?
        new HSSFClientAnchor(0, 0, 0, 0, (short) i,
        row.getRowNum(), (short) (i + 1), row.getRowNum() + 1):
          new XSSFClientAnchor(0, 0, 0, 0, (short) i,
              row.getRowNum(), (short) (i + 1), row.getRowNum() + 1);
    if (entity.getExportImageType() == 1) {
      ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
      BufferedImage bufferImg;
      try {
View Full Code Here

            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()
                    CTMarker ctMarker = anchor.getFrom()
                    String picIndex = ctMarker.getRow() + "_" + ctMarker.getCol()
                    sheetIndexPicMap.put(picIndex, pic.getPictureData())
               
            } 
        } 
View Full Code Here

      short column = (short) image.getColumn();
      // int width = Math.abs(image.getWidth());
      // int height = Math.abs(image.getHeight());

      int index = workbook.addPicture(bytes, type);
      XSSFClientAnchor anchor = new XSSFClientAnchor(0, 0, 0, 0, row, column, row, column);

      XSSFDrawing drawing = s.createDrawingPatriarch();
      XSSFPicture picture = drawing.createPicture(anchor, index);

      picture.resize();
View Full Code Here

      cell.setCellStyle(styles.get("header"));
      String[] ss = StringUtils.split(headerList.get(i), "**", 2);
      if (ss.length==2){
        cell.setCellValue(ss[0]);
        Comment comment = this.sheet.createDrawingPatriarch().createCellComment(
            new XSSFClientAnchor(0, 0, 0, 0, (short) 3, 3, (short) 5, 6));
        comment.setString(new XSSFRichTextString(ss[1]));
        cell.setCellComment(comment);
      }else{
        cell.setCellValue(headerList.get(i));
      }
View Full Code Here

      short column = (short) image.getColumn();
      // int width = Math.abs(image.getWidth());
      // int height = Math.abs(image.getHeight());

      int index = workbook.addPicture(bytes, type);
      XSSFClientAnchor anchor = new XSSFClientAnchor(0, 0, 0, 0, row, column, row, column);

      XSSFDrawing drawing = s.createDrawingPatriarch();
      XSSFPicture picture = drawing.createPicture(anchor, index);

      picture.resize();
View Full Code Here

TOP

Related Classes of org.apache.poi.xssf.usermodel.XSSFClientAnchor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.