This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 3. Format Text Example | |
function FormatText() { | |
var spreadsheet = SpreadsheetApp.getActive(); | |
spreadsheet.getActiveRangeList().setFontWeight('bold') | |
.setFontStyle('italic') | |
.setFontColor('#ff0000') | |
.setFontSize(18) | |
.setFontFamily('Montserrat'); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onOpen() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var menuEntries = []; | |
menuEntries.push({ name:"Text to columns", functionName:"textToColumns" }); | |
menuEntries.push({ name:"Text to columns (custom separator)", functionName:"textToColumnsCustom" }); | |
menuEntries.push(null); | |
menuEntries.push({ name:"Columns to Text", functionName:"columnsToText" }); | |
menuEntries.push({ name:"Columns to Text (custom separator)", functionName:"columnsToTextCustom" }); | |
ss.addMenu("Advanced", menuEntries); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function deleteRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); | |
var values = rows.getValues(); | |
var rowsDeleted = 0; | |
for (var i = 0; i <= numRows - 1; i++) { | |
var row = values[i]; | |
if (row[0] == 'delete' || row[0] == '') { // This searches all cells in columns A (change to row[1] for columns B and so on) and deletes row if cell is empty or has value 'delete'. |
NewerOlder