0

Excel テーブルの領域コレクションの "items" プロパティを読み込めません。

Excel テーブル (tbl) があり、次のコードを使用しています。

var dataBody = tbl.getDataBodyRange();
var visCells = dataBody.getSpecialCells("Visible");
visCells.load(["areas"]);
context.sync();
console.log(visCells.areas);
var areas = visCells.areas;
console.log(areas)
areas.load(["items"]);
context.sync();
console.log(areas.items);

「RichApi.Error: The property 'items' is not available. Before reading the property's value, call the load method on the container object and call "context.sync()" on the associated request context.」というエラーが表示されます。

ご覧のとおり、すでに領域で load(["items"]) メソッドを呼び出してから、context.sync() を呼び出していました。「アイテム」プロパティが読み込まれない理由がわかりません。

load("items") と load() と load("$all") を呼び出そうとしました。同じエラー。

誰でもこの問題で私を助けてくれますか?

ありがとう

4

0 に答える 0