Excel.CommentReply class

ブック内のコメント応答を表します。

Extends

プロパティ

authorEmail

コメント返信作成者のメール アドレスを取得します。

authorName

コメント返信作成者の名前を取得します。

content

コメント応答のコンテンツ。 文字列はプレーン テキストです。

context

オブジェクトに関連付けられている要求コンテキスト。 これにより、アドインのプロセスが Office ホスト アプリケーションのプロセスに接続されます。

creationDate

コメント返信の作成日時を取得します。

id

コメント応答識別子を指定します。

メソッド

delete()

コメント返信を削除します。

getLocation()

このコメント応答が配置されているセルを取得します。

getParentComment()

この応答の親コメントを取得します。

load(options)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(propertyNames)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(propertyNamesAndPaths)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

set(properties, options)

オブジェクトの複数のプロパティを同時に設定します。 適切なプロパティを持つプレーン オブジェクトまたは同じ型の別の API オブジェクトを渡すことができます。

set(properties)

既存の読み込まれたオブジェクトに基づいて、オブジェクトに複数のプロパティを同時に設定します。

toJSON()

API オブジェクトがJSON.stringify()に渡されたときにより便利な出力を提供するために、JavaScript toJSON() メソッドをオーバーライドします。 (JSON.stringify、それに渡されるオブジェクトの toJSON メソッドを呼び出します)。元の Excel.CommentReply オブジェクトは API オブジェクトですが、 toJSON メソッドは、元のオブジェクトから読み込まれた子プロパティの浅いコピーを含むプレーンな JavaScript オブジェクト ( Excel.Interfaces.CommentReplyData として型指定) を返します。

プロパティの詳細

authorEmail

コメント返信作成者のメール アドレスを取得します。

readonly authorEmail: string;

プロパティ値

string

注釈

API セット: ExcelApi 1.10

authorName

コメント返信作成者の名前を取得します。

readonly authorName: string;

プロパティ値

string

注釈

API セット: ExcelApi 1.10

content

コメント応答のコンテンツ。 文字列はプレーン テキストです。

content: string;

プロパティ値

string

注釈

API セット: ExcelApi 1.10

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml

await Excel.run(async (context) => {
    const sheet = context.workbook.worksheets.getItem("Comments");
    const comment = sheet.comments.getItemAt(0);
    const reply = comment.replies.getItemAt(0);
    reply.load("content");
    // Sync to load the content of the comment reply.
    await context.sync();

    // Append "Please!" to the end of the comment reply.
    reply.content += " Please!";
    await context.sync();
});

context

オブジェクトに関連付けられている要求コンテキスト。 これにより、アドインのプロセスが Office ホスト アプリケーションのプロセスに接続されます。

context: RequestContext;

プロパティ値

creationDate

コメント返信の作成日時を取得します。

readonly creationDate: Date;

プロパティ値

Date

注釈

API セット: ExcelApi 1.10

id

コメント応答識別子を指定します。

readonly id: string;

プロパティ値

string

注釈

API セット: ExcelApi 1.10

メソッドの詳細

delete()

コメント返信を削除します。

delete(): void;

返品

void

注釈

API セット: ExcelApi 1.10

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comments-and-notes/comment-replies.yaml

await Excel.run(async (context) => {
    // Remove the first comment reply from this worksheet's first comment.
    const sheet = context.workbook.worksheets.getItem("Comments");
    const comment = sheet.comments.getItemAt(0);
    comment.replies.getItemAt(0).delete();
    await context.sync();
});

getLocation()

このコメント応答が配置されているセルを取得します。

getLocation(): Excel.Range;

返品

注釈

API セット: ExcelApi 1.10

getParentComment()

この応答の親コメントを取得します。

getParentComment(): Excel.Comment;

返品

注釈

API セット: ExcelApi 1.10

load(options)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(options?: Excel.Interfaces.CommentReplyLoadOptions): Excel.CommentReply;

パラメーター

options
Excel.Interfaces.CommentReplyLoadOptions

読み込むオブジェクトのプロパティのオプションを提供します。

返品

load(propertyNames)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(propertyNames?: string | string[]): Excel.CommentReply;

パラメーター

propertyNames

string | string[]

読み込むプロパティを指定するコンマ区切り文字列または文字列の配列。

返品

load(propertyNamesAndPaths)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(propertyNamesAndPaths?: {
            select?: string;
            expand?: string;
        }): Excel.CommentReply;

パラメーター

propertyNamesAndPaths

{ select?: string; expand?: string; }

propertyNamesAndPaths.select は読み込むプロパティを指定するコンマ区切りの文字列で、 propertyNamesAndPaths.expand は読み込むナビゲーション プロパティを指定するコンマ区切りの文字列です。

返品

set(properties, options)

オブジェクトの複数のプロパティを同時に設定します。 適切なプロパティを持つプレーン オブジェクトまたは同じ型の別の API オブジェクトを渡すことができます。

set(properties: Interfaces.CommentReplyUpdateData, options?: OfficeExtension.UpdateOptions): void;

パラメーター

properties
Excel.Interfaces.CommentReplyUpdateData

メソッドが呼び出されるオブジェクトのプロパティに等形的に構造化されたプロパティを持つ JavaScript オブジェクト。

options
OfficeExtension.UpdateOptions

properties オブジェクトが読み取り専用プロパティを設定しようとした場合にエラーを抑制するオプションを提供します。

返品

void

set(properties)

既存の読み込まれたオブジェクトに基づいて、オブジェクトに複数のプロパティを同時に設定します。

set(properties: Excel.CommentReply): void;

パラメーター

properties
Excel.CommentReply

返品

void

toJSON()

API オブジェクトがJSON.stringify()に渡されたときにより便利な出力を提供するために、JavaScript toJSON() メソッドをオーバーライドします。 (JSON.stringify、それに渡されるオブジェクトの toJSON メソッドを呼び出します)。元の Excel.CommentReply オブジェクトは API オブジェクトですが、 toJSON メソッドは、元のオブジェクトから読み込まれた子プロパティの浅いコピーを含むプレーンな JavaScript オブジェクト ( Excel.Interfaces.CommentReplyData として型指定) を返します。

toJSON(): Excel.Interfaces.CommentReplyData;

返品