public static int GetCellIntValue(this ISheet sheet, int rowIndex, int colIndex, int defaultValue = 0) { var cell = new WorkbookCell { RowIndex = rowIndex, ColIndex = colIndex }; return(GetCellIntValue(sheet, cell, defaultValue)); }
public static int GetCellIntValue(this ISheet sheet, WorkbookCell cellIndex, int defaultValue = 0) { var cell = sheet.GetRow(cellIndex.RowIndex).GetCell(cellIndex.ColIndex); return(cell != null && cell.CellType != CellType.Blank ? (int)cell.NumericCellValue : defaultValue); }