[]
Sheets.ThreadedComments.ThreadedComment
• new ThreadedComment()
スレッド形式のコメントオブジェクトで、返信の追加、読み取り、更新、削除、およびシリアル化をサポートします。
▸ add(reply): null | IReply
返信を追加します。返信が指定されていない場合は、現在のユーザー ID と現在時刻が使用されます。
実例
const activeSheet = spread.getActiveSheet();
const threadedCommentManager = activeSheet.threadedComments;
const tc = threadedCommentManager.add(1, 1);
const reply = tc.add({ message: [{ type: GC.Spread.Sheets.ThreadedComments.ContentType.text, value: 'hello' }] });
console.log(reply);
| 名前 | 型 | 説明 |
|---|---|---|
reply |
IReply |
返信してコメントを追加します。 |
null | IReply
▸ all(replies?): IReply[]
すべての返信を取得または設定します。配列が提供された場合、現在のスレッドに追加します。
実例
const activeSheet = spread.getActiveSheet();
const threadedCommentManager = activeSheet.threadedComments;
const tc = threadedCommentManager.add(1, 1);
tc.add({ message: [{ type: GC.Spread.Sheets.ThreadedComments.ContentType.text, value: 'hello' }] });
const allReplies = tc.all();
console.log(allReplies);
| 名前 | 型 |
|---|---|
replies? |
IReply[] |
IReply[]
▸ col(): number
スレッド式コメントの列を取得します。
実例
const activeSheet = spread.getActiveSheet();
const threadedCommentManager = activeSheet.threadedComments;
const tc = threadedCommentManager.add(1, 1);
const col = tc.col();
console.log(col);
number
▸ get(index): undefined | IReply
インデックスを指定して返信を取得します。
実例
const activeSheet = spread.getActiveSheet();
const threadedCommentManager = activeSheet.threadedComments;
const tc = threadedCommentManager.add(1, 1);
tc.add({ message: [{ type: GC.Spread.Sheets.ThreadedComments.ContentType.text, value: 'hello' }] });
const reply = tc.get(0);
console.log(reply);
| 名前 | 型 | 説明 |
|---|---|---|
index |
number |
ゼロ基準の返信インデックス。 |
undefined | IReply
▸ remove(index): null | IReply
インデックスを指定して返信を削除します。
実例
const activeSheet = spread.getActiveSheet();
const threadedCommentManager = activeSheet.threadedComments;
const tc = threadedCommentManager.add(1, 1);
tc.add({ message: [{ type: GC.Spread.Sheets.ThreadedComments.ContentType.text, value: 'hello' }] });
tc.add({ message: [{ type: GC.Spread.Sheets.ThreadedComments.ContentType.text, value: 'world' }] });
tc.remove(0);
console.log(tc.get(0));
| 名前 | 型 | 説明 |
|---|---|---|
index |
number |
返信のインデックス。 |
null | IReply
▸ resolved(resolved?): boolean
スレッドが解決済みであるかどうかを取得または設定します。
実例
const activeSheet = spread.getActiveSheet();
const threadedCommentManager = activeSheet.threadedComments;
const tc = threadedCommentManager.add(1, 1);
tc.add({ message: [{ type: GC.Spread.Sheets.ThreadedComments.ContentType.text, value: 'hello' }] });
tc.resolved(true);
console.log(tc.resolved());
| 名前 | 型 |
|---|---|
resolved? |
boolean |
boolean
▸ row(): number
スレッド式コメントの行を取得します。
実例
const activeSheet = spread.getActiveSheet();
const threadedCommentManager = activeSheet.threadedComments;
const tc = threadedCommentManager.add(1, 1);
const row = tc.row();
console.log(row);
number
▸ set(index, reply): void
返信の内容とメタデータを更新します。
実例
const activeSheet = spread.getActiveSheet();
const threadedCommentManager = activeSheet.threadedComments;
const tc = threadedCommentManager.add(1, 1);
tc.add({ message: [{ type: GC.Spread.Sheets.ThreadedComments.ContentType.text, value: 'hello' }] });
tc.set(0, { message: [{ type: GC.Spread.Sheets.ThreadedComments.ContentType.text, value: 'hello, world' }] });
console.log(tc.get(0));
| 名前 | 型 | 説明 |
|---|---|---|
index |
number |
返信のインデックス。 |
reply |
IReply |
新しい返信。 |
void