我正在尝试设置特定表格单元格的顶部和底部边框。为整个表设置BORDER_WIDTH是可以的。
function myFunction() {
var doc=DocumentApp.getActiveDocument();
var body=doc.getBody();
var tables=body.getTables();
tables[0].setBorderWidth(2);
也可以使用样式方法
var borderstyle={};
borderstyle[DocumentApp.Attribute.BORDER_WIDTH]=2;
tables[0].setAttributes(borderstyle);
我看不出如何对单个细胞做同样的事情
tables[0].getCell(2,2).setAttributes(borderstyle);
此方法失败 - 文档说只有TABLSE的BORDER_WIDTH? 任何想法??