Excel.CommentRichContent interface
Stellt den Inhalt dar, der in einem Kommentar oder einer Kommentarantwort enthalten ist. Umfangreiche Inhalte enthalten die Textzeichenfolge und alle anderen Objekte, die im Kommentartext enthalten sind, z. B. Erwähnungen.
Hinweise
Eigenschaften
mentions | Ein Array, das alle Entitäten (z. B. Personen) enthält, die im Kommentar erwähnt werden. |
rich |
Gibt den umfangreichen Inhalt des Kommentars an (z. B. Kommentarinhalt mit Erwähnungen, die erste erwähnte Entität hat das ID-Attribut 0 und die zweite erwähnte Entität hat das ID-Attribut 1). |
Details zur Eigenschaft
mentions
Ein Array, das alle Entitäten (z. B. Personen) enthält, die im Kommentar erwähnt werden.
mentions?: Excel.CommentMention[];
Eigenschaftswert
Hinweise
Beispiele
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/12-comment/comment-mentions.yaml
await Excel.run(async (context) => {
const sheet = context.workbook.worksheets.getItem("Comments");
const mention = {
email: "kakri@contoso.com",
id: 0,
name: "Kate Kristensen"
};
// This will tag the mention's name using the '@' syntax.
// They will be notified via email.
const commentBody = {
mentions: [mention],
richContent: '<at id="0">' + mention.name + "</at> - Can you take a look?"
};
// Note that an InvalidArgument error will be thrown if multiple cells passed to `comment.add`.
sheet.comments.add("A1", commentBody, Excel.ContentType.mention);
await context.sync();
});
richContent
Gibt den umfangreichen Inhalt des Kommentars an (z. B. Kommentarinhalt mit Erwähnungen, die erste erwähnte Entität hat das ID-Attribut 0 und die zweite erwähnte Entität hat das ID-Attribut 1).
richContent: string;
Eigenschaftswert
string
Hinweise
Office Add-ins
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für