먼저 범위를 가져 와서 그 값을 얻어야합니다.
var sheet = SpreadsheetApp.getActiveSheet();
//Gets all cell values form column "O" starting from row 2. Returns a 2d array
var wholeColumnUrls = SpreadsheetApp.getActiveSheet().getRange("O2:O").getValues();
//Gets value from specific cell "O2".
var singleCellUrl = SpreadsheetApp.getActiveSheet().getRange("O2").getValue();
는 defining a range의 multipleways 있습니다이 예에서 우리는 A1notation variant를 사용합니다. 당신이 찾고있는 것 같아요.
또한 getValues()
과 getValue()
의 차이점을 확인하십시오. 첫 번째 반환과 같은 2 차원 배열 : https://politicsandwar.com/api/nation/id=31831
그 방법과 같은 단일 값은 당신이 모든 값을 가져 어떠했는지를 선택하고 반복, 또는에 자신의 논리를 가질 수 후자의 반환 동안
[
[https://politicsandwar.com/api/nation/id=31831]
,[https://politicsandwar.com/api/nation/id=31832]
,[https://politicsandwar.com/api/nation/id=31833]
]
각 셀을 결정하고 값을 별도로 얻으십시오.