Freigeben über


Comment-Klasse

Comment.When the object is serialized out as xml, its qualified name is x:comment.

Vererbungshierarchie

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Spreadsheet.Comment

Namespace:  DocumentFormat.OpenXml.Spreadsheet
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(CommentProperties), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(CommentText))> _
Public Class Comment _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As Comment
[ChildElementInfoAttribute(typeof(CommentProperties), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(CommentText))]
public class Comment : OpenXmlCompositeElement

Hinweise

The following table lists the possible child types:

  • CommentText <x:text>

  • CommentProperties <x:commentPr>

[ISO/IEC 29500-1 1. Ausgabe]

18.7.3 comment (Comment)

This element represents a single user entered comment. Each comment shall have an author and can optionally contain richly formatted text.

Parent Elements

commentList (§18.7.4)

Child Elements

Subclause

commentPr (Comment Properties)

§18.7.5

text (Comment Text)

§18.7.7

Attributes

Description

authorId (Author Id)

Required. An unsigned integer which is used as the zero based index into the list of authors for this set of comments.

The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype.

guid (Unique Identifier for Comment)

Unique identifier for this comment. The attribute is required and shall be unique across all comments in shared workbooks.

The possible values for this attribute are defined by the ST_Guid simple type (§22.9.2.4).

ref (Cell Reference)

Required. A string that serves as the A1 style reference to the cell that the comment is associated with. Shall only reference a single cell, not a range of cells, since comments are on a per cell basis.

The possible values for this attribute are defined by the ST_Ref simple type (§18.18.62).

shapeId (Shape ID)

Specifies the ID of the DrawingML shape that provides the visual representation of the comment.

[Example:

<comment shapeId="10 " … >

end example]

The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype.

[Note: The W3C XML Schema definition of this element's content model (CT_Comment) is located in §A.2. end note]

© ISO/IEC29500: 2008. Die oben aufgeführten Textauszüge wurden von Microsoft (und/oder den Microsoft-Vendoren) von Englisch nach Deutsch übersetzt, und im Rahmen von ISO wird keinerlei Verantwortung für diese Übersetzungen übernommen.

Threadsicherheit

Alle öffentlichen static (Shared in Visual Basic) Member dieses Typs sind threadsicher. Bei Instanzmembern ist die Threadsicherheit nicht gewährleistet.

Siehe auch

Referenz

Comment-Member

DocumentFormat.OpenXml.Spreadsheet-Namespace