apps-script-utils 2.1.1 Help

removeSchema

function removeSchema( sheet: GoogleAppsScript.Spreadsheet.Sheet, options: RemoveSchemaOptions | null | undefined = {} ): boolean;

The stored description goes; the data and the header row stay exactly as they are. A sheet with no schema stored is left alone and the call reports false.

validation: true also clears the data validation on the columns the schema described. It is off by default on purpose: Apps Script offers no way to tell a rule the schema created from one a person added by hand, so clearing takes both.

Parameters

Parameter

Type

Description

sheet

GoogleAppsScript.Spreadsheet.Sheet

The sheet to work on.

options (optional) = {}

RemoveSchemaOptions \| null \| undefined

validation also clears the data validation the schema implied.

Returns

boolean — true when a schema was removed.

Throws

Exception

Condition

InvalidSheetException

the first argument is not a sheet.

Examples

Removing a schema

const sheet = SpreadsheetApp.getActiveSheet(); removeSchema(sheet); // => true when one was there removeSchema(sheet, { validation: true }); // also clears the rules it implied

See also

Source

src/appsscript/sheet/removeSchema.ts

23 September 2026

This documentation was generated with AI (Claude) from the library's source code.