In Google Sheets using Apps Script, I want to read in the font color in many cells, change some values (change colors) in the array, and write them back to the cells.
I have previously used getFontColors()
and it worked, but it got deprecated so trying to update my script. I can read in the font colors using getFontColorObjects()
, I can display them in the execution log (outRngFontColors.asRgbColor().asHexString()
), but I don't know how to change the values in the Color[][]
array (ex. #000000
to #ff00ff
). So how do I do that? I only want to read the font colors once and then write them back out only once.
var ss = SpreadsheetApp.getActiveSpreadsheet();<br>
var sheet = ss.getActiveSheet();<br>
var outColRange = sheet.getRange(1, 1, 3);<br>
var outRngFontColors = outColRange.getFontColorObjects();
<code>
and<pre>
)