class SpreadsheetApp method .clearFormat()

SpreadsheetApp is the Apps Script service.

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

What it does

Removes only formatting from a range, keeping values.

Why it's used

  • Strip conditional colors or bolding while keeping the values.
  • Normalize pasted data before applying your own styles.

Common errors

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

Explore

Related methods

Better Sheets tutorials

No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.

Related blog posts

Written guides about SpreadsheetApp.clearFormat().

Browse the blog