Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

How do you work with the Color Class array?

$
0
0

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();

Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>