javascript - Sheets API formatting header - Stack Overflow

PHOTO EMBED

Thu Mar 31 2022 23:43:42 GMT+0000 (Coordinated Universal Time)

Saved by @itsbrex

This operation does however have to be done after the first row has been appended, as otherwise the row will continue to copy the bolded formatting from the first line.

The order of requests should be as follows:

spreadsheets.batchUpdate request to make the first row bold
spreadsheets.values.append request to add the headers
spreadsheets.values.append request to add the first set of data
spreadsheets.batchUpdate request to update rows 2 and down so to not copy over the bold text formatting.
content_copyCOPY

https://stackoverflow.com/questions/62300724/sheets-api-formatting-header