Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

gsheet get cell background color

/**
 * Returns the Hexadecimal value of a cell's background color.
 *
 * @param {number} row The cell's row number.
 * @param {number} column The cell's column number.
 * @return The Hexadecimal value of the cell's background color.
 * @customfunction
 */
function BGHEX(row, column) {
  var background = SpreadsheetApp.getActive().getDataRange().getCell(row, column).getBackground();
  return background;
}
Source by spreadsheet.dev #
 
PREVIOUS NEXT
Tagged: #gsheet #cell #background #color
ADD COMMENT
Topic
Name
5+6 =