Skip to content

Instantly share code, notes, and snippets.

View hperchec's full-sized avatar

Hervé Perchec hperchec

View GitHub Profile
@hperchec
hperchec / Code.gs
Created May 12, 2025 13:59
Google Apps Script - Modify a spreadsheet row
/**
* Modifies the cells in a row.
* Offers the possibility to set a new value or define a formula, and to change the style.
*
* @param {string} sheetName - The name of the spreadsheet to modify.
* @param {number} rowIndex - The index of the row to modify.
* @param {object} newValues - An object containing the new values for the cells.
* The keys of the object are the column indices (starting from 1),
* and the values are objects with the following format:
* {