テンプレート ファイルから Google ドキュメントでレポートを生成しようとしています。ドキュメントをコピーすると、元のドキュメントの形式ではなく、すべての形式がユーザーのデフォルトにリセットされます。ドキュメント、tableRow、および tableCell の両方のレベルで書式設定を設定するために次のことを試しましたが、レポートが作成されたときの行間隔は 1.5 で、段落の後にスペースがあります
var style = {};
style[DocumentApp.Attribute.SPACING_AFTER] =0;
style[DocumentApp.Attribute.SPACING_BEFORE] =0;
style[DocumentApp.Attribute.LINE_SPACING]=1;
var newrow= tables[2].insertTableRow(n).setBold(false).setAttributes(style);
if(j==0){
newrow.insertTableCell(0,reportDate).setPaddingBottom(0).setPaddingTop(0).setAttributes(style);
}
else{
newrow.insertTableCell(0,'').setPaddingBottom(0).setPaddingTop(0).setAttributes(style);
}
newrow.insertTableCell(0,values1[rowId1][1]+' '+values1[rowId1][2]).setPaddingBottom(0).setPaddingTop(0).setAttributes(style);
newrow.insertTableCell(0,'').setPaddingBottom(0).setPaddingTop(0).setAttributes(style);
doc.editAsText().setAttributes(style);
レポートをこれらの属性に従わせるための提案はありますか?