I get an error when I try to sort below. Why?
TypeError—Function getRange not found on object 1680.
(line 5, file "Original 2") Do not display
function A(){
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var origin=spreadsheet.getSheetByName('Original 2');
var origin_last_row = origin.getLastRow();
origin_last_row.getRange(2,1,origin_last_row-1).sort([1,2,12]);
}
The origin.getLastRow()
return value is Integer type (last line number), so there is no getRange()
method.
This post was posted as a community wiki based on @metropolis' comments.
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
916 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.