次の方法で共有


Excel.CommentDeletedEventArgs interface

コメント削除イベントを発生させたコメントに関する情報を提供します。

注釈

[ API セット: ExcelApi 1.12 ]

async function registerEventHandlers() {
    await Excel.run(async (context) => {
        // Register the onDeleted comment event handler.
        const comments = context.workbook.worksheets.getActiveWorksheet().comments;
        comments.onDeleted.add(commentDeleted);
        await context.sync();
    });
}

async function commentDeleted(event: Excel.CommentDeletedEventArgs) {
    // Print out the deleted comment's ID.
    // Note: This function assumes only a single comment is deleted at a time.
    await Excel.run(async (context) => {
        console.log(`A comment was deleted:`);
        console.log(`    ID: ${event.commentDetails[0].commentId}`);
    });
}

プロパティ

commentDetails

関連する応答のコメント ID と ID を含む CommentDetail 配列を取得します。

source

イベントのソースを指定します。 詳細は「Excel.EventSource」をご覧ください。

type

イベントの種類を取得します。 詳細は「Excel.EventType」をご覧ください。

worksheetId

イベントが発生したワークシートの ID を取得します。

プロパティの詳細

commentDetails

関連する応答のコメント ID と ID を含む CommentDetail 配列を取得します。

commentDetails: Excel.CommentDetail[];

プロパティ値

注釈

[ API セット: ExcelApi 1.12 ]

source

イベントのソースを指定します。 詳細は「Excel.EventSource」をご覧ください。

source: Excel.EventSource | "Local" | "Remote";

プロパティ値

Excel.EventSource | "Local" | "Remote"

注釈

[ API セット: ExcelApi 1.12 ]

type

イベントの種類を取得します。 詳細は「Excel.EventType」をご覧ください。

type: "CommentDeleted";

プロパティ値

"CommentDeleted"

注釈

[ API セット: ExcelApi 1.12 ]

worksheetId

イベントが発生したワークシートの ID を取得します。

worksheetId: string;

プロパティ値

string

注釈

[ API セット: ExcelApi 1.12 ]