I have a problem similar to one posted on the Google Product Forums.
The answer given there described a way which requires action from the recipients of the link to make a copy of the Google Spreadsheet by themselves.
There is a script, which creates a personal folder for a person who wants to edit the COPY of the Google Spreadsheet. Than the the ORIGINAL Google Spreadsheet copied into a newly created folder:
fileforanswers.makeCopy(fileforanswers.getName(), targetFolder);
The permissions for the COPY set:
fileforanswers.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.EDIT)"
The Google Spreadsheet contains 1 sheet. The protection settings for the COPY of the Google Spreadsheet "SHEET" are:
if (protection && protection.canEdit()) { protection.remove(); }
For the "RANGE" are:
if (protection && protection.canEdit()) { protection.remove(); }
The link contains the ID of the COPY of the Google Spreadsheet. When the COPY of the Google Spreadsheet accessed by its own link directly by a person who wants to fill it Google Sheets allows to VIEW it only
The settings described above are set manually for the ORIGINAL Google Spreadsheet. When the ORIGINAL Google Spreadsheet accessed by its own link by the same person the same way described in case of the COPY, Google Sheets allows to EDIT the ORIGINAL.
What else required to allow in the script to enable editing of the COPY of the Google Spreadsheet?