MCPcopy Create free account
hub / github.com/analyticswithadam/App_Script / removeFormatting

Function removeFormatting

Formatting.js:135–149  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133}
134
135function removeFormatting() {
136 // Get the active spreadsheet and sheet
137 const spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
138 const sheet = spreadsheet.getActiveSheet();
139
140 // Get the range of all cells that contain data
141 const lastRow = sheet.getLastRow();
142 const lastColumn = sheet.getLastColumn();
143 const range = sheet.getRange(1, 1, lastRow, lastColumn);
144
145 // Clear all formatting from the range
146 range.clearFormat();
147
148 Logger.log('Formatting removed from the sheet.');
149}
150

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected