Package org.apache.poi.hssf.util

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


    //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


      CellReference botRight = new CellReference(area.getLastRow(),area.getLastColumn(),!area.isLastRowRelative(),!area.isLastColRelative());
     
      if(AreaReference.isWholeColumnReference(topLeft, botRight)) {
        return (new AreaReference(topLeft, botRight)).formatAsString();
      } else {
        return topLeft.formatAsString() + ":" + botRight.formatAsString();
      }
    }

    public byte getDefaultOperandClass() {
        return Ptg.CLASS_REF;
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((short) 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((short) y);
                c.setCellFormula("" + ref + operator + ref2);
View Full Code Here

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

View Full Code Here

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

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


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

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


                assertTrue("loop Formula is as expected "+ref+operator+ref2+"!="+c.getCellFormula(),(
                (""+ref+operator+ref2).equals(c.getCellFormula())
                                                         )
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

    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

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.