Hot answers tagged

1

I fixed this issue by refreshing (reloading) the page.


1

The method getSheetByName takes sheet name as an argument and returns the sheet with that name. It cannot return "Luke", so the comparison s.getSheetByName == 'Luke' will never be valid (not to mention that s is undefined in your code and the method lacks a parameter). If you want to check that the active sheet is named Luke, you should use getSheetName ...



Only top voted, non community-wiki answers of a minimum length are eligible