I have two main spreadsheets. The first is like a database, let's call it "A". The second ("B") will be used by the user to view some records from the "A" with importrange. The user can make some changes to the "A" but only with scripts.
Also, I want to hide the "A" spreadsheet from the user so that they can't just go directly to the "A" and see whatever data they want.
Is there any way to achive this?
My last attempt:
The user must be an editor to make changes to the "A", so I set spreadsheet sharing option to "anyone in your organization can edit" so that users can edit but cannot see the "A" spreadsheet unless they have a URL. So i wanted to hide the URL from them. I thought that would be enough. The URL is in two places: one in the importrange function, one in the script.
To hide this in importrange, I created third spreadsheet (let's call it "C") which imports the range from the "A" and now the "B" imports range from the "C". I am the only one who has access to the "C" and via my account i have connected "B" with "C" and "C" with "A". So even if user reads the URL from the functon, he can't see exacly what's inside the "C".
To hide a URL a bit in a script, I created an external library with the URL inside. The user can still find it, but it's a little more difficult.
The main problem with all of this was that when the user ran a script that edits "A", the "A" spreadsheet would appear in the "Shared with Me" folder.