[]
Sheets.ThreadedComments.ThreadedCommentManager
• new ThreadedCommentManager()
スレッド式コメントをワークシート上で追加、取得、削除、列挙およびシリアル化するためのマネージャーを表します。
▸ add(row, col, replies?): null | ThreadedComment
指定されたセルにスレッド式コメントを追加します。
実例
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);
| 名前 | 型 | 説明 |
|---|---|---|
row |
number |
行インデックス。 |
col |
number |
列インデックス。 |
replies? |
IReply[] |
- |
null | ThreadedComment
スレッド式コメントのインスタンス。
▸ all(): ThreadedComment[]
ワークシート上のすべてのスレッド式コメントを配列で取得します。
実例
const activeSheet = spread.getActiveSheet();
const threadedCommentManager = activeSheet.threadedComments;
const allComments = threadedCommentManager.all();
console.log(allComments);
▸ clear(range?): void
指定された範囲内のスレッド式コメントをクリアします。範囲が指定されていない場合は、シート内のすべてのスレッド式コメントをクリアします。
実例
const activeSheet = spread.getActiveSheet();
const threadedCommentManager = activeSheet.threadedComments;
threadedCommentManager.clear(new GC.Spread.Sheets.Range(1, 1, 3, 3));
| 名前 | 型 |
|---|---|
range? |
Range |
void
▸ get(row, col): undefined | ThreadedComment
指定されたセルのスレッド式コメントを取得します。
実例
const activeSheet = spread.getActiveSheet();
const threadedCommentManager = activeSheet.threadedComments;
const threadedComment = threadedCommentManager.get(1, 1);
console.log(threadedComment);
| 名前 | 型 | 説明 |
|---|---|---|
row |
number |
行インデックス。 |
col |
number |
列インデックス。 |
undefined | ThreadedComment
▸ remove(row, col): undefined | ThreadedComment
指定されたセルのスレッド式コメントを削除します。
実例
const activeSheet = spread.getActiveSheet();
const threadedCommentManager = activeSheet.threadedComments;
threadedCommentManager.remove(1, 1);
| 名前 | 型 | 説明 |
|---|---|---|
row |
number |
行インデックス。 |
col |
number |
列インデックス。 |
undefined | ThreadedComment
▸ size(): number
ワークシート上のスレッド式コメントの数を取得します。
実例
const activeSheet = spread.getActiveSheet();
const threadedCommentManager = activeSheet.threadedComments;
const size = threadedCommentManager.size();
console.log(size);
number