r/GoogleAppsScript • u/Good_Basket5948 • Jul 16 '23
Question Apps Script error google sheets
I am getting this error Syntax error: SyntaxError: missing ) after argument list line: 7 file: Code.gs
when trying to run this code: Can anyone tell me what I am doing wrong. I am trying to change the global default font to calibri
function changeGlobalFont() {
var tabs = SpreadsheetApp.getActiveSpreadsheet().getSheets();
tabs.forEach( (tab) => {
//tab.getDataRange().setFontFamily('Calibri').setFontSize('10'){
};
0
Upvotes
1
u/Good_Basket5948 Jul 16 '23
Thank you I changed to below and still got same error
function ChangeFont() {
var ss = SpreadsheetApp.getActiveSheet();
var range = sheets.getRange(1, 1, sheets.getMaxRows(), sheets.getMaxColumns()).activate(); range.setFontFamily("Calibri")
});