是否有可能通过获取溢出?我正在尝试从外部来源返回数据,该数据将填满多个单元格(例如,溢出)。我可以实现其中之一,但不能同时达到两者。以下返回一个#VALUE!错误:
/**
* Get text values that spill both right and down.
* @customfunction
*/
function me() {
let url = "https://example.com";
return new Promise(function (resolve, reject) {
fetch(url).then(function (response) {
resolve([
['apples', 200, 'pounds'],
['oranges', 3, 'pounds'],
['pears', 5, 'crates']
]);
})
})
}```
通过“ spilling”,我认为您的意思是您不知道提前的行数和列数。在这种情况下,您应该获得外部数组的length属性和第一个内部数组的length属性。然后使用这些值创建要写入的范围地址。