When you try to use the Sheet.getRange(row, column, numRows, numColumns) method Sheet.getRange(row, column, numRows, numColumns) , which is in the Google App Scripts documentation (for Google Sheets), you get the error: Не удается обнаружить метод getRange(number,number,number,number) . What could be the problem? Why is there a method in the documentation, but in fact it is not? At the same time, all other overloaded methods besides this also “do not exist”.

  • Show the code. How do you get Sheet? - Sergiks
  • @Sergiks By table ID: var sheet = SpreadsheetApp.openById('/*Здесь идёт ID таблицы*/'); . And all methods work, except the above. - Janislav Kornev
  • JavaScript - untyped language - overloading can not be. - oshliaer

1 answer 1

Understood, the problem was that the SpreadsheetApp.openById('/*Здесь идёт ID таблицы*/'); method SpreadsheetApp.openById('/*Здесь идёт ID таблицы*/'); returns a SpreadSheet object, not a Sheet .

  • that's nice :): Sergiks