我有一个脚本,但它不起作用:
function onOpen(e){
var sheet = Spreadsheet.getActiveSheet();
//Load all the URLs
var urls = sheet.getRange("A:A").getValues();
//Initialize array for content
var text = [];
//Loop through URLs
for(var i = 0; i < urls.length; i += 1){
//Fetch the webpage, push the content to the array (inside an array since it needs to be 2d)
text.push(
[UrlFetchApp.fetch(urls[i][0]).getContentText()]
);
}
//Store text in spreadsheet
sheet.getRange("B:B").setValues(text);
}
它继续前进,但卡在字符串 13 中:指定了没有值的属性:url(字符串·13)。有任何想法吗?