class SpreadsheetApp method .setFontWeight()

SpreadsheetApp is the Apps Script service.

.setFontWeight() is the method name you will see after a dot in your code.

What it does

Sets text to normal or bold in a range.

Why it's used

  • Bold totals or section headers from script.
  • Emphasize rows that need the user's attention.

Common errors

  • Forgetting parentheses on setFontWeight. Write SpreadsheetApp.setFontWeight(), not SpreadsheetApp.setFontWeight or setFontWeight by itself.
  • Skipping dots between chained calls. Each step needs a dot, like SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Data').setFontWeight().
  • Adding spaces where they do not belong. Write SpreadsheetApp.setFontWeight(), not SpreadsheetApp .setFontWeight(), SpreadsheetApp.setFontWeight (), or SpreadsheetApp . setFontWeight().
  • Wrong capitalization. Use SpreadsheetApp and setFontWeight, not spreadsheetapp or setfontweight.

Explore

Related methods

Better Sheets tutorials

Create an Internal Google Sheets Add-on

Create an Internal Google Sheets Add-on

The entire process to create and publish a Google Sheets Add-on internal...
Google Maps Scraper for Outreach

Google Maps Scraper for Outreach

Get this fun template to search on google maps via API, and quickly mess...
Introducing SheetFools

Introducing SheetFools

Free google sheets automations pranks you can use right now. Launching p...

Related blog posts

Written guides about SpreadsheetApp.setFontWeight().

Browse the blog