嘗試使用具有多個值的應用程式腳本追加行,其中之一是 RichTextValue 變數。
var richValue = SpreadsheetApp.newRichTextValue()
.setText('link')
.setLinkUrl('www.somesite.com')
.build();
sheet.appendRow([varX,varY,varZ,richValue ]);
問題是使用帶有richValue 的appendRow 不要添加richValue 的屬性。
我發現向作業表添加 RichTextValue 的唯一記錄方法是通過 setRichTextValue/s
我知道使用 setRichTextValue/s 可以得到相同的結果,但我更喜歡將 appendRow 與 RichTextValue 變數一起使用。
uj5u.com熱心網友回復:
試試appendRows_()實用函式,如下所示:
const richValue = SpreadsheetApp.newRichTextValue()
.setText('link')
.setLinkUrl('www.somesite.com')
.build();
appendRows_(sheet, [varX, varY, varZ, richValue]);
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/463907.html
上一篇:回圈遍歷作業表的函式
