Package org.apache.poi.hssf.util

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


                c = r.getCell(y);
                CellReference cr= new CellReference(refx1, refy1, false, false);
                String ref=cr.formatAsString();
                ref=cr.formatAsString();
                cr=new CellReference(refx2,refy2, false, false);
                String ref2=cr.formatAsString();


                assertTrue("loop Formula is as expected "+ref+operator+ref2+"!="+c.getCellFormula(),(
                (""+ref+operator+ref2).equals(c.getCellFormula())
                                                         )
View Full Code Here


      return cce.getValue();
    }
    if (isDebugLogEnabled()) {
      String sheetName = getSheetName(sheetIndex);
      CellReference cr = new CellReference(rowIndex, columnIndex);
      logDebug("Evaluated " + sheetName + "!" + cr.formatAsString() + " to " + result.toString());
    }
    // Usually (result === cce.getValue())
    // But sometimes: (result==ErrorEval.CIRCULAR_REF_ERROR, cce.getValue()==null)
    // When circular references are detected, the cache entry is only updated for
    // the top evaluation frame
View Full Code Here

  private NotImplementedException addExceptionInfo(NotImplementedException inner, int sheetIndex, int rowIndex, int columnIndex) {

    try {
      String sheetName = _workbook.getSheetName(sheetIndex);
      CellReference cr = new CellReference(sheetName, rowIndex, columnIndex, false, false);
      String msg =  "Error evaluating cell " + cr.formatAsString();
      return new NotImplementedException(msg, inner);
    } catch (Exception e) {
      // avoid bombing out during exception handling
      e.printStackTrace();
      return inner; // preserve original exception
View Full Code Here

    public String toString() {
      StringBuffer sb = new StringBuffer(64);
      CellReference crA = new CellReference(_firstRowIndex, _firstColumnIndex, false, false);
      CellReference crB = new CellReference(_lastRowIndex, _lastColumnIndex, false, false);
      sb.append(getClass().getName());
      sb.append(" [").append(crA.formatAsString()).append(':').append(crB.formatAsString()).append("]");
      return sb.toString();
    }
  }

  private final Map<BookSheetKey, BlankCellSheetGroup> _sheetGroupsByBookSheet;
View Full Code Here

  private static String formatTestCaseDetails(String sheetName, int rowIndex, HSSFCell c, String currentGroupComment,
      String rowComment) {

    StringBuffer sb = new StringBuffer();
    CellReference cr = new CellReference(sheetName, rowIndex, c.getColumnIndex(), false, false);
    sb.append(cr.formatAsString());
    sb.append(" {=").append(c.getCellFormula()).append("}");

    if(currentGroupComment != null) {
      sb.append(" '");
      sb.append(currentGroupComment);
View Full Code Here

    public void setPrintArea(int sheetIndex, int startColumn, int endColumn,
                              int startRow, int endRow) {

        //using absolute references because they don't get copied and pasted anyway
        CellReference cell = new CellReference(startRow, startColumn, true, true);
        String reference = cell.formatAsString();

        cell = new CellReference(endRow, endColumn, true, true);
        reference = reference+":"+cell.formatAsString();

        setPrintArea(sheetIndex, reference);
View Full Code Here

        //using absolute references because they don't get copied and pasted anyway
        CellReference cell = new CellReference(startRow, startColumn, true, true);
        String reference = cell.formatAsString();

        cell = new CellReference(endRow, endColumn, true, true);
        reference = reference+":"+cell.formatAsString();

        setPrintArea(sheetIndex, reference);
    }

View Full Code Here

  private static String formatTestCaseDetails(String sheetName, int rowIndex, HSSFCell c) {

    StringBuffer sb = new StringBuffer();
    CellReference cr = new CellReference(sheetName, rowIndex, c.getColumnIndex(), false, false);
    sb.append(cr.formatAsString());
    sb.append(" {=").append(c.getCellFormula()).append("}");
    return sb.toString();
  }

  /**
 
View Full Code Here

    sb.append(getClass().getName()).append("[");
    sb.append(_evaluator.getSheetName());
    sb.append('!');
    sb.append(crA.formatAsString());
    sb.append(':');
    sb.append(crB.formatAsString());
    sb.append("]");
    return sb.toString();
  }
}
View Full Code Here

    buffer.append("    .alwaysClc= ").append(isAlwaysCalc()).append("\n");
    buffer.append("    .reserved = ").append(HexDump.intToHex(field_6_res)).append("\n");
    CellReference crRowInput = cr(field_7_rowInputRow, field_8_colInputRow);
    CellReference crColInput = cr(field_9_rowInputCol, field_10_colInputCol);
    buffer.append("    .rowInput = ").append(crRowInput.formatAsString()).append("\n");
    buffer.append("    .colInput = ").append(crColInput.formatAsString()).append("\n");
    buffer.append("[/TABLE]\n");
    return buffer.toString();
  }

  private static CellReference cr(int rowIx, int colIxAndFlags) {
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.