Is it possible to disable a user from being able to add a new sheet to a google spreadsheet? I basically want to disable the "+" and "add 1000 rows" function for a spreadsheet.
Sean
Is it possible to disable a user from being able to add a new sheet to a google spreadsheet? I basically want to disable the "+" and "add 1000 rows" function for a spreadsheet.
Sean
Generally speaking, you can not change the spreadsheet "native" features, so the answer is no.
You might try a few workarounds as suggested in @Kriggs comment but you probably won't find it very practical.
I suppose you were asking this because some users are messing up your spreadsheets doing unintentional mistakes ? if that's the case then the best approach is probably to create an onOpen function that will "clean up" the document when one opens it, deleting all unnecessary rows and columns and removing empty sheets.
If you need more about how to achieve this please edit your question to add more details.
bonus : demo code
function resetPageLayout() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sh = ss.getSheetByName('Sheet1');
ss.toast('Now processing your sheet','Wait a few seconds',5);
if(sh.getMaxRows()-sh.getLastRow()>0){sh.deleteRows(sh.getLastRow()+1, sh.getMaxRows()-sh.getLastRow())};
if(sh.getMaxColumns()-sh.getLastColumn()>0){sh.deleteColumns(sh.getLastColumn()+1, sh.getMaxColumns()-sh.getLastColumn())};
var sheets = ss.getSheets();
for(var n=0;n<sheets.length;n++){
if(sheets[n].getName()!='Sheet1'){
try{
ss.deleteSheet(sheets[n])}catch(err){
Browser.msgBox('Can\'t delete Sheet named "'+sheets[n].getName()+'" ('+err+')');
}
}
}
SpreadsheetApp.flush();
}