public static HSSFCell getCellFromSheetByCell(HSSFSheet sheet, int row, int col) {
HSSFRow r = getRowFromSheetByRow(sheet, row);
return r.getCell(col, Row.CREATE_NULL_AS_BLANK);
}
总是在调用getCell的时候报错:
Exception in thread "main" java.lang.NoSuchMethodError:
org.apache.poi.hssf.usermodel.HSSFRow.getCell(ILorg/apache/poi/ss/usermodel/Row$MissingCellPolicy;)Lorg/apache/poi/hssf/usermodel/HSSFCell;
是没有定义getCell方法吗?奇怪
改成别的方式也会报类似错误,如:
public static HSSFCell getCellFromSheetByCell(HSSFSheet sheet, int row, int col) {
HSSFRow r = getRowFromSheetByRow(sheet, row);
return r.getCell(col);
}
下意识的开始搜索getCell函数的使用方法,但是Google了半天还是没啥结果。。。