Java Code Examples for org.apache.poi.ss.util.AreaReference#getLastCell()

The following examples show how to use org.apache.poi.ss.util.AreaReference#getLastCell() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AreaPtgBase.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
protected AreaPtgBase(AreaReference ar) {
    CellReference firstCell = ar.getFirstCell();
    CellReference lastCell = ar.getLastCell();
    setFirstRow(firstCell.getRow());
    setFirstColumn(firstCell.getCol() == -1 ? 0 : firstCell.getCol());
    setLastRow(lastCell.getRow());
    setLastColumn(lastCell.getCol() == -1 ? 0xFF : lastCell.getCol());
    setFirstColRelative(!firstCell.isColAbsolute());
    setLastColRelative(!lastCell.isColAbsolute());
    setFirstRowRelative(!firstCell.isRowAbsolute());
    setLastRowRelative(!lastCell.isRowAbsolute());
}
 
Example 2
Source File: Area.java    From yarg with Apache License 2.0 4 votes vote down vote up
public Area(AreaReference areaReference) {
    topLeft = new Cell(areaReference.getFirstCell());
    bottomRight = new Cell(areaReference.getLastCell());
}