[]
        
(Showing Draft Content)

GC.Spread.Sheets.ThreadedComments.ThreadedComment

クラス: ThreadedComment

Sheets.ThreadedComments.ThreadedComment

Table of contents

コンストラクタ

メソッド

コンストラクタ

constructor

new ThreadedComment()

スレッド形式のコメントオブジェクトで、返信の追加、読み取り、更新、削除、およびシリアル化をサポートします。

メソッド

add

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

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

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

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

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(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

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

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