fix comment

This commit is contained in:
Looly
2019-08-20 11:34:42 +08:00
parent ac7a6edb25
commit 8040a4d33c
2 changed files with 9 additions and 4 deletions

View File

@@ -289,11 +289,15 @@ public class ExcelBase<T extends ExcelBase<T>> implements Closeable {
* </pre>
*
* @param rowNum 行号
* @return 列数
* @return 列数-1表示获取失败
*/
public int getColumnCount(int rowNum) {
// getLastCellNum方法返回序号+1的值
return this.sheet.getRow(rowNum).getLastCellNum();
final Row row = this.sheet.getRow(rowNum);
if(null != row) {
// getLastCellNum方法返回序号+1的值
return row.getLastCellNum();
}
return -1;
}
/**