Explanation:
You haven't provided what this magical xx
function does, but according to the first code snippet, xx
accepts a single array of elements.
Therefore, one way of going from 2D
array to 1D
is to use flat
Solution:
function myFunction() {
const ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Input")
const urls = ss.getRange(2, 1, ss.getLastRow()-1).getValues().flat(); // 1D array
const results = xx(urls);
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…