Example usage for org.apache.poi.hssf.usermodel HSSFName isDeleted

List of usage examples for org.apache.poi.hssf.usermodel HSSFName isDeleted

Introduction

In this page you can find the example usage for org.apache.poi.hssf.usermodel HSSFName isDeleted.

Prototype

public boolean isDeleted() 

Source Link

Usage

From source file:org.openelis.bean.QcChartReport1Bean.java

License:Open Source License

private Cell getCellForName(HSSFSheet sheet, HSSFName name) {
    AreaReference aref;/*from ww  w.  j  a v  a  2 s .  c  o m*/
    Cell cell;
    CellReference cref[];

    cell = null;
    if (name != null && !name.isDeleted()) {
        aref = new AreaReference(name.getRefersToFormula());
        cref = aref.getAllReferencedCells();
        cell = sheet.getRow(cref[0].getRow()).getCell((int) cref[0].getCol());
    }

    return cell;
}

From source file:org.openelis.bean.WorksheetExcelHelperBean.java

License:Open Source License

private Cell getCellForName(HSSFSheet sheet, String name) {
    AreaReference aref;/*  www  . j  av  a 2 s. c  o m*/
    Cell cell;
    CellReference cref[];
    HSSFName cellName;

    cell = null;
    cellName = sheet.getWorkbook().getName(name);
    if (cellName != null && !cellName.isDeleted()) {
        aref = new AreaReference(cellName.getRefersToFormula());
        cref = aref.getAllReferencedCells();
        cell = sheet.getRow(cref[0].getRow()).getCell((int) cref[0].getCol());
    }

    return cell;
}

From source file:uk.ac.manchester.cs.owl.semspreadsheets.model.hssf.impl.WorkbookHSSFImpl.java

License:BSD License

public Collection<NamedRange> getNamedRanges() {
    Collection<NamedRange> result = new ArrayList<NamedRange>();
    for (int i = 0; i < workbook.getNumberOfNames(); i++) {
        HSSFName name = workbook.getNameAt(i);
        if (!name.isDeleted() && !name.isFunctionName()) {
            NamedRange range = new NamedRangeHSSFImpl(this, name);
            result.add(range);/*from   ww  w  . j a  va2  s .  co m*/
        }
    }
    return result;
}