/** * Accessor for the last row * * @return the last row */ public int getLastRow() { if (dvParser == null) { initialize(); } return dvParser.getLastRow(); }
/** * Accessor for the last row * * @return the last row */ public int getLastRow() { if (dvParser == null) { initialize(); } return dvParser.getLastRow(); }
/** * Gets the range of cells to which the data validation applies. If the * validation applies to just this cell, this will be reflected in the * returned range * * @return the range to which the same validation extends, or NULL if this * cell doesn't have a validation */ public Range getSharedDataValidationRange() { if (!dataValidation) { return null; } DVParser dvp = getDVParser(); return new SheetRangeImpl(writableCell.getSheet(), dvp.getFirstColumn(), dvp.getFirstRow(), dvp.getLastColumn(), dvp.getLastRow()); } }
/** * Gets the range of cells to which the data validation applies. If the * validation applies to just this cell, this will be reflected in the * returned range * * @return the range to which the same validation extends, or NULL if this * cell doesn't have a validation */ public Range getSharedDataValidationRange() { if (!dataValidation) { return null; } DVParser dvp = getDVParser(); return new SheetRangeImpl(writableCell.getSheet(), dvp.getFirstColumn(), dvp.getFirstRow(), dvp.getLastColumn(), dvp.getLastRow()); } }
/** * Public function which removes any data validation, if present */ public void removeDataValidation() { if (!dataValidation) { return; } // If the data validation is shared, then generate a warning DVParser dvp = getDVParser(); if (dvp.extendedCellsValidation()) { logger.warn("Cannot remove data validation from " + CellReferenceHelper.getCellReference(writableCell) + " as it is part of the shared reference " + CellReferenceHelper.getCellReference(dvp.getFirstColumn(), dvp.getFirstRow()) + "-" + CellReferenceHelper.getCellReference(dvp.getLastColumn(), dvp.getLastRow())); return; } // Remove the validation from the WritableSheet object if present writableCell.removeDataValidation(); clearValidationSettings(); }
/** * Public function which removes any data validation, if present */ public void removeDataValidation() { if (!dataValidation) { return; } // If the data validation is shared, then generate a warning DVParser dvp = getDVParser(); if (dvp.extendedCellsValidation()) { logger.warn("Cannot remove data validation from " + CellReferenceHelper.getCellReference(writableCell) + " as it is part of the shared reference " + CellReferenceHelper.getCellReference(dvp.getFirstColumn(), dvp.getFirstRow()) + "-" + CellReferenceHelper.getCellReference(dvp.getLastColumn(), dvp.getLastRow())); return; } // Remove the validation from the WritableSheet object if present writableCell.removeDataValidation(); clearValidationSettings(); }
"-" + CellReferenceHelper.getCellReference(dvp.getLastColumn(), dvp.getLastRow()) + " because the selected cell " + CellReferenceHelper.getCellReference(cell) + for (int y = dvp.getFirstRow(); y <= dvp.getLastRow(); y++) dvp.getFirstRow(), dvp.getLastColumn(), dvp.getLastRow());
"-" + CellReferenceHelper.getCellReference(dvp.getLastColumn(), dvp.getLastRow()) + " because the selected cell " + CellReferenceHelper.getCellReference(cell) + for (int y = dvp.getFirstRow(); y <= dvp.getLastRow(); y++) dvp.getFirstRow(), dvp.getLastColumn(), dvp.getLastRow());
"-" + CellReferenceHelper.getCellReference(dvp.getLastColumn(), dvp.getLastRow())); return;
"-" + CellReferenceHelper.getCellReference(dvp.getLastColumn(), dvp.getLastRow())); return;
"-" + CellReferenceHelper.getCellReference(dvp.getLastColumn(), dvp.getLastRow())); return;
"-" + CellReferenceHelper.getCellReference(dvp.getLastColumn(), dvp.getLastRow())); return;