vaadin spreadsheet readonly mode

Is there a way to make the spreadsheet readonly. ie I do not want to allow editing any values in the entire spreadsheet. Right now double clicking on a cell allows to edit the value of the cell.

Have you tried setReportStyle(true)? You can try it out in the Report Mode of the Spreadsheet
demo
, sources in
GitHub
.

Or possibly sheet.protectSheet(String password)

Right, this is what I get when I don’t have time to check my info… so sheet.setActiveSheetProtected(password); was the correct command, reportStyle was the one that removed top and bottom bars. Sorry about the confusion :slight_smile: There also seems to be a bug that still enables copy-pasting into a protected sheet, I just made a
ticket
about it.

Thanks Anna. I locked the sheet using excel and it worked. I am sure setActiveSheetProtected will give the same effect.

Hi,

Nice, but you can’t resize columns or rows when you lock sheet and unlock cells. Would be sweet to be able to lock cells explicitly.