So, first of all, this used to work perfectly, up until about a week or so ago. However, now it has stopped working and gives the following error.
Error encountered: Unknown sheet name
Any ideas. Here is the fragment of code being called.
var activeSheet = SpreadsheetApp.getActiveSheet();
Many thanks in advance for your help!
There is an issue on this on the issue tracker, please star it to keep track of its evolution. If your case is different (not related to Ui), then you can start a new one.