Package org.apache.poi.hssf.util

Examples of org.apache.poi.hssf.util.AreaReference


    protected AreaPtg() {
      //Required for clone methods
    }
  
    public AreaPtg(String arearef) {
        AreaReference ar = new AreaReference(arearef);
        setFirstRow((short)ar.getCells()[0].getRow());
        setFirstColumn((short)ar.getCells()[0].getCol());
        setLastRow((short)ar.getCells()[1].getRow());
        setLastColumn((short)ar.getCells()[1].getCol());
        setFirstColRelative(!ar.getCells()[0].isColAbsolute());
        setLastColRelative(!ar.getCells()[1].isColAbsolute());
        setFirstRowRelative(!ar.getCells()[0].isRowAbsolute());
        setLastRowRelative(!ar.getCells()[1].isRowAbsolute());       
    }
View Full Code Here


    return result;
  }*/

  public void setArea( String ref )
  {
    AreaReference ar = new AreaReference( ref );
    CellReference[] crs = ar.getCells();
   
    CellReference firstCell = crs[0];
    CellReference lastCell = firstCell;
    if(crs.length > 1) {
      lastCell = crs[1];
View Full Code Here

        int namedCellIdx = wb.getNameIndex(cellName);
        HSSFName aNamedCell = wb.getNameAt(namedCellIdx);
        assertNotNull(aNamedCell);
       
        // retrieve the cell at the named range and test its contents
        AreaReference aref = new AreaReference(aNamedCell.getReference());
        CellReference[] crefs = aref.getCells();
        assertNotNull(crefs);
        assertEquals("Should be exactly 1 cell in the named cell :'" +cellName+"'", 1, crefs.length);
        for (int i=0, iSize=crefs.length; i<iSize; i++) {
            CellReference cref = crefs[i];
            assertNotNull(cref);
View Full Code Here

    private AreaPtg() {
      //Required for clone methods
    }
  
    public AreaPtg(String arearef) {
        AreaReference ar = new AreaReference(arearef);
        setFirstRow((short)ar.getCells()[0].getRow());
        setFirstColumn((short)ar.getCells()[0].getCol());
        setLastRow((short)ar.getCells()[1].getRow());
        setLastColumn((short)ar.getCells()[1].getCol());
        setFirstColRelative(!ar.getCells()[0].isColAbsolute());
        setLastColRelative(!ar.getCells()[1].isColAbsolute());
        setFirstRowRelative(!ar.getCells()[0].isRowAbsolute());
        setLastRowRelative(!ar.getCells()[1].isRowAbsolute());
       
    }
View Full Code Here

    return result;
  }*/

  public void setArea( String ref )
  {
    AreaReference ar = new AreaReference( ref );

    setFirstRow( (short) ar.getCells()[0].getRow() );
    setFirstColumn( (short) ar.getCells()[0].getCol() );
    setLastRow( (short) ar.getCells()[1].getRow() );
    setLastColumn( (short) ar.getCells()[1].getCol() );
    setFirstColRelative( !ar.getCells()[0].isColAbsolute() );
    setLastColRelative( !ar.getCells()[1].isColAbsolute() );
    setFirstRowRelative( !ar.getCells()[0].isRowAbsolute() );
    setLastRowRelative( !ar.getCells()[1].isRowAbsolute() );

  }
View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.util.AreaReference

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.