Is spilling with fetch possible?

Copper Contributor

I am trying to return data from an external source and that data will fill up multiple cells (e.g. spilling). I can achieve 1 or the other but not both. The following returns a #VALUE! error:

 

 

 

 

 

/**
 * 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']
      ]);
    })
  })
 }

 

 

 

 

 

0 Replies