List of usage examples for org.apache.poi.hssf.usermodel HSSFHyperlink getFirstColumn
@Override public int getFirstColumn()
From source file:edu.ku.brc.specify.tasks.subpane.wb.XLSImport.java
License:Open Source License
/** * @param cell/*from w ww .java2 s .c o m*/ * @param activeHyperlinks * @return the Hyperlink applicable for the cell. * * NOTE: This code assumes that hyperlinks' row and column ranges do not overlap. */ protected HSSFHyperlink checkHyperlinks(final HSSFCell cell, final Vector<HSSFHyperlink> activeHyperlinks) { if (cell.getHyperlink() != null) { HSSFHyperlink l = cell.getHyperlink(); if (l.getLastRow() > cell.getRowIndex() || l.getLastColumn() > cell.getColumnIndex()) { activeHyperlinks.add(l); } return l; } for (HSSFHyperlink hl : activeHyperlinks) { if (cell.getRowIndex() >= hl.getFirstRow() && cell.getRowIndex() <= hl.getLastRow() && cell.getColumnIndex() >= hl.getFirstColumn() && cell.getColumnIndex() <= hl.getLastColumn()) { if (cell.getRowIndex() == hl.getLastRow()) { activeHyperlinks.remove(hl); } return hl; } } return null; }