public Col getColumnForCell(String sheetName, CellReference cellReference) { Worksheet sheet = getSheetByName(sheetName); List<Cols> colsList = sheet.getCols(); for (Cols cols : colsList) { for (Col col : cols.getCol()) { if (col.getMin() <= cellReference.getColumn() && cellReference.getColumn() <= col.getMax()) { return col; } } } return null; }
public Col getColumnForCell(String sheetName, CellReference cellReference) { Worksheet sheet = getSheetByName(sheetName); List<Cols> colsList = sheet.getCols(); for (Cols cols : colsList) { for (Col col : cols.getCol()) { if (col.getMin() <= cellReference.getColumn() && cellReference.getColumn() <= col.getMax()) { return col; } } } return null; }