0
votes

I've inserted a script to hide row when user click on a button in a googlesheet document. This document is opened simultanously with multiple users. My problem, when a user click on the button, rows are hiden for all users.

Is there a possibility to limit the action on the user who click the button?

here is the code to hide row:

activeSheet.hideRows(rowStart,rowCount)

thanks a lot for your help

Cyrille

2

2 Answers

1
votes

Every simultaneous user sees the spreadsheet at the same state. The only exception is with filter views that can show the sheet with some rows hidden, and in a different sort order.

Unfortunately, I do not think that filter views can be configured programatically. They are managed by client code in the user's browser, while Apps Script runs on Google's servers and consequently has no access to filter views.

One workaround, a bit clumsy though, is to insert links in the frozen section of the sheet to easily switch between filter views. See the Filter views example spreadsheet for an illustration. This works well but the filter views need to be defined in advance, and that cannot be done programatically.

0
votes

Use Fiter Views to allow each user getting different partial view at the same time. https://support.google.com/a/users/answer/9308952?hl=en