Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 month ago
How to modify cell values from CellValueHandler
Hi,
I have following requirement.
In spreadsheet if a user enters a negativa value inside a cell I need to show a message and reset cell value to 0.
To achieve this I have immplemented CellValueHandler and registered it with my spreadsheet instance. But inside cellValueUpdated() method if I change the cell value to zero it is not reflecting in UI. Is this a bug? Here is the code snippet of what I am trying to do
public boolean cellValueUpdated(Cell cell, Sheet sheet, int colIndex, int rowIndex, String newValue,
FormulaEvaluator formulaEvaluator, DataFormatter formatter) {
sheet.getRow(rowIndex).getCell(colIndex).setCellValue(0);
}
Last updated on
You cannot reply to this thread.