With google apps script, we can write spreadsheet functions that we can call from a cell like:
function f() {
return [['A', 'B'],['C', 'D']];
}
Then if we fill a cell with =f()
, A 2x2 group of cells are filled with the values 'A', 'B', then 'C', 'D', starting from the cell we entered the formula.
Is there any way we can also set the formatting of the cell from this return value? Maybe instead of returning a plain string for each cell, we can return an object which may contain a 'value' key and a 'format' key?