[]
        
(Showing Draft Content)

GC.Spread.Sheets.ThreadedComments.ThreadedCommentManager

クラス: ThreadedCommentManager

Sheets.ThreadedComments.ThreadedCommentManager

Table of contents

コンストラクタ

メソッド

コンストラクタ

constructor

new ThreadedCommentManager()

スレッド式コメントをワークシート上で追加、取得、削除、列挙およびシリアル化するためのマネージャーを表します。

メソッド

add

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

all(): ThreadedComment[]

ワークシート上のすべてのスレッド式コメントを配列で取得します。

実例

const activeSheet = spread.getActiveSheet();
const threadedCommentManager = activeSheet.threadedComments;
const allComments = threadedCommentManager.all();
console.log(allComments);

戻り値

ThreadedComment[]


clear

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

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

remove(row, col): undefined | ThreadedComment

指定されたセルのスレッド式コメントを削除します。

実例

const activeSheet = spread.getActiveSheet();
const threadedCommentManager = activeSheet.threadedComments;
threadedCommentManager.remove(1, 1);

パラメータ

名前 説明
row number 行インデックス。
col number 列インデックス。

戻り値

undefined | ThreadedComment


size

size(): number

ワークシート上のスレッド式コメントの数を取得します。

実例

const activeSheet = spread.getActiveSheet();
const threadedCommentManager = activeSheet.threadedComments;
const size = threadedCommentManager.size();
console.log(size);

戻り値

number