Ich habe Code, den ich für ein Google Apps-Skriptmakro verwende. Dies verwendet den DocumentApp TableRow- und den Tabellenzellen-Datentyp.Google Apps Script TableCell akzeptiert keine Attribute
Also wenn ich diese Funktion ausführen, ist die resultierende Zelle in der Zeile immer noch der Standard linksbündig. Fehle ich etwas? Sie haben dieses Beispiel auf ihrer Website.
https://developers.google.com/apps-script/reference/document/table-cell#setAttributes(Object)
var body = DocumentApp.getActiveDocument().getBody();
// Define a custom paragraph style.
var style = {};
style[DocumentApp.Attribute.HORIZONTAL_ALIGNMENT] =
DocumentApp.HorizontalAlignment.RIGHT;
style[DocumentApp.Attribute.FONT_FAMILY] = 'Calibri';
style[DocumentApp.Attribute.FONT_SIZE] = 18;
style[DocumentApp.Attribute.BOLD] = true;
// Append a plain paragraph.
var par = body.appendParagraph('A paragraph with custom style.');
// Apply the custom style.
par.setAttributes(style);