-3
I have two independent functions that apply spreadsheet formatting to googledocs, and I would like to merge them into one. These are functions 1 and 2 below.
FUNCTION 1
function nomeColunas() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
var nomes = [["DATA", "AUDITOR", "MEDIDAS SOLICITADAS",]];
var faixa = sheet.getRange("A1:I1");
faixa.setValues(nomes);
}
FUNCTION 2
function formataCelulas() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
var faixa = sheet.getRangeList(['A:M']);
faixa.setHorizontalAlignment('center');
faixa.setVerticalAlignment('middle');
faixa.setWrap(true);
Logger.log(formataCelulas);
}
It does not depend on anything not. It is exactly what the colleague answered, which worked.
– Rogér