Package org.apache.poi.hssf.util

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


    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 rowNum, HSSFCell c, String currentGroupComment,
      String rowComment) {
   
    StringBuffer sb = new StringBuffer();
    CellReference cr = new CellReference(sheetName, rowNum, c.getCellNum(), false, false);
    sb.append(cr.formatAsString());
    sb.append(" {=").append(c.getCellFormula()).append("}");
   
    if(currentGroupComment != null) {
      sb.append(" '");
      sb.append(currentGroupComment);
View Full Code Here

                    refy2=(short)(y-3);
                }

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

                c = r.createCell(y);
                c.setCellFormula("" + ref + operator + ref2);
View Full Code Here

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

                c = r.createCell(y);
                c.setCellFormula("" + ref + operator + ref2);

View Full Code Here

                    refy2=y-3;
                }

                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();

View Full Code Here

                }

                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(),(
View Full Code Here

                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

    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

                    refy2=(short)(y-3);
                }

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

                c = r.createCell(y);
                c.setCellFormula("" + ref + operator + ref2);
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.