Examples of formatAsString()


Examples of org.apache.poi.ss.util.CellReference.formatAsString()

  }
 
  public static String offsetCellIndex(String cellIndex, int rowOffset, int colOffset){
    CellReference cell = new CellReference(cellIndex);
    CellReference newCell = new CellReference(cell.getRow() + rowOffset, cell.getCol() + colOffset);
    return newCell.formatAsString().replaceAll("\\$", "");
  }
 
  public static String offsetFormula(String formula, int rowOffset, int colOffset){
    StringBuffer sb = new StringBuffer();
    Matcher matcher = DYNAMIC_CELL_PATTREN.matcher(formula);
View Full Code Here

Examples of org.apache.poi.ss.util.CellReference.formatAsString()

     *
     * @param col the 0-based column of the cell that contains the comment
     */
    public void setColumn(int col) {
        CellReference ref = new CellReference(getRow(), col);
    _comment.setRef(ref.formatAsString());
        if(_vmlShape != null) _vmlShape.getClientDataArray(0).setColumnArray(0, new BigInteger(String.valueOf(col)));
  }

    /**
     * Set the row of the cell that contains the comment
View Full Code Here

Examples of org.apache.poi.ss.util.CellReference.formatAsString()

                CTCommentList lst = sheetComments.getCTComments().getCommentList();
                for (CTComment comment : lst.getCommentArray()) {
                    CellReference ref = new CellReference(comment.getRef());
                    if(ref.getRow() == rownum){
                        ref = new CellReference(rownum + n, ref.getCol());
                        comment.setRef(ref.formatAsString());
                    }
                }
            }
        }
        XSSFRowShifter rowShifter = new XSSFRowShifter(this);
View Full Code Here

Examples of org.apache.poi.ss.util.CellReference.formatAsString()

     * @param toprow the top row to show in desktop window pane
     * @param leftcol the left column to show in desktop window pane
     */
    public void showInPane(short toprow, short leftcol) {
        CellReference cellReference = new CellReference(toprow, leftcol);
        String cellRef = cellReference.formatAsString();
        getPane().setTopLeftCell(cellRef);
    }

    public void ungroupColumn(int fromColumn, int toColumn) {
        CTCols cols = worksheet.getColsArray(0);
View Full Code Here

Examples of org.apache.poi.ss.util.CellReference.formatAsString()

  }

  protected final String formatReferenceAsString() {
    // Only make cell references as needed. Memory is an issue
    CellReference cr = new CellReference(getRow(), getColumn(), !isRowRelative(), !isColRelative());
    return cr.formatAsString();
  }

  public final byte getDefaultOperandClass() {
    return Ptg.CLASS_REF;
  }
View Full Code Here

Examples of org.apache.poi.ss.util.CellReference.formatAsString()

     * @see org.apache.poi.hssf.usermodel.HSSFSheet#addMergedRegion(org.apache.poi.ss.util.CellRangeAddress)
     * @throws IllegalStateException if modification is not allowed
     */
    void notifyArrayFormulaChanging(){
        CellReference ref = new CellReference(this);
        String msg = "Cell "+ref.formatAsString()+" is part of a multi-cell array formula. " +
                "You cannot change part of an array.";
        notifyArrayFormulaChanging(msg);
    }

}
View Full Code Here

Examples of org.zkoss.poi.ss.util.CellRangeAddress.formatAsString()

    assertEquals(6, sheet1.getNumMergedRegions());
    for (int j = 0; j < 6; ++j) {
      CellRangeAddress rng = sheet1.getMergedRegion(j);
      switch(j) {
      case 0:
        assertEquals("E6:F8", rng.formatAsString());
        break;
      case 1:
        assertEquals("E10:F12", rng.formatAsString());
        break;
      case 2:
View Full Code Here

Examples of org.zkoss.poi.ss.util.CellReference.formatAsString()

                  CTCommentList lst = sheetComments.getCTComments().getCommentList();
                  for (CTComment comment : lst.getCommentArray()) {
                      CellReference ref = new CellReference(comment.getRef());
                      if(ref.getRow() == rownum){
                          ref = new CellReference(rownum + n, ref.getCol());
                          comment.setRef(ref.formatAsString());
                      }
                  }
              }
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.