This example makes the cell hidden on printouts when current sheet is not modifiable.
spreadsheet.getActiveSheet().cells(5,5).setPrintHidden(true); spreadsheet.getActiveSheet().protect("1234");
Related information
PrintHidden property