Il problema segnalato è stato risolto, as of 12 Jan 2016. La gamma ha ora questi metodi:
- setBorder(top, left, bottom, right, vertical, horizontal), come prima.
- setBorder(top, left, bottom, right, vertical, horizontal, color, style), NOVITÀ!
Gli esempi sono forniti nella documentazione; ecco come impostare un bordo rosso tratteggiato *:
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
var cell = sheet.getRange("B2");
// Sets borders on the top and bottom, but leaves the left and right unchanged
// Also sets the color to "red", and the border to "DASHED".
cell.setBorder(true, null, true, null, false, false, "red", SpreadsheetApp.BorderStyle.DASHED);
* corretti, come da commento: la documentazione è sbagliato, dovrebbe essere SpreadsheetApp.BorderStyle.DASHED/PUNTEGGIATO/SOLID, non Range. - gotofritz
Star questo problema, creato per rendere disponibili quelli in Script di Google Apps: [http://code.google.com/p/google-apps-script-issues/issues/detail?id=2002] (http://code.google.com/p/google-apps-script-issues/issues/detail?id=2002) –
Link corretto: http://code.google.com/p/google-apps-script- issues/issues/detail? id = 2002 –