本文整理汇总了Java中jxl.biff.EmptyCell类的典型用法代码示例。如果您正苦于以下问题:Java EmptyCell类的具体用法?Java EmptyCell怎么用?Java EmptyCell使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EmptyCell类属于jxl.biff包,在下文中一共展示了EmptyCell类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getEmptyCell
点赞 2
import jxl.biff.EmptyCell; //导入依赖的package包/类
public EmptyCell getEmptyCell(int rowNum, int colNum) {
Cell cell = getCell(rowNum, colNum);
if (cell instanceof EmptyCell) {
return (EmptyCell) cell;
}
return null;
}
开发者ID:thinking-github,
项目名称:nbone,
代码行数:9,
代码来源:ExcelOper.java
示例2: findCellByName
点赞 2
import jxl.biff.EmptyCell; //导入依赖的package包/类
/**
* Gets the named cell from this workbook. If the name refers to a
* range of cells, then the cell on the top left is returned. If
* the name cannot be found, null is returned
*
* @param name the name of the cell/range to search for
* @return the cell in the top left of the range if found, NULL
* otherwise
*/
public Cell findCellByName(String name)
{
NameRecord nr = (NameRecord) namedRecords.get(name);
if (nr == null)
{
return null;
}
NameRecord.NameRange[] ranges = nr.getRanges();
// Go and retrieve the first cell in the first range
Sheet s = getSheet(getExternalSheetIndex(ranges[0].getExternalSheet()));
int col = ranges[0].getFirstColumn();
int row = ranges[0].getFirstRow();
// If the sheet boundaries fall short of the named cell, then return
// an empty cell to stop an exception being thrown
if (col > s.getColumns() || row > s.getRows())
{
return new EmptyCell(col, row);
}
Cell cell = s.getCell(col, row);
return cell;
}
开发者ID:loginus,
项目名称:jexcelapi,
代码行数:37,
代码来源:WorkbookParser.java