## Comment class

Encapsule l'objet qui représente un commentaire de cellule.

```csharp
public class Comment
```

## Propriétés

| Nom | La description |
| --- | --- |
| [Author](../../aspose.cells/comment/author) { get; set; } | Obtient et définit le nom de l'auteur du commentaire d'origine |
| [AutoSize](../../aspose.cells/comment/autosize) { get; set; } | Indique si la taille du commentaire est ajustée automatiquement en fonction de son contenu. |
| [Column](../../aspose.cells/comment/column) { get; } | Obtient l'index de colonne du commentaire. |
| [CommentShape](../../aspose.cells/comment/commentshape) { get; } | Récupère un objet Shape qui représente la forme attachée au commentaire spécifié. |
| [Font](../../aspose.cells/comment/font) { get; } | Obtient la police du commentaire. |
| [Height](../../aspose.cells/comment/height) { get; set; } | Représente la hauteur du commentaire, en unité de pixels. |
| [HeightCM](../../aspose.cells/comment/heightcm) { get; set; } | Représente la hauteur du commentaire, en unité de centimètres. |
| [HeightInch](../../aspose.cells/comment/heightinch) { get; set; } | Représente la hauteur du commentaire, en pouces. |
| [HtmlNote](../../aspose.cells/comment/htmlnote) { get; set; } | Obtient et définit la chaîne html qui contient des données et certains formats dans ce commentaire. |
| [IsThreadedComment](../../aspose.cells/comment/isthreadedcomment) { get; } | Indique si ce commentaire est un fil de discussion. |
| [IsVisible](../../aspose.cells/comment/isvisible) { get; set; } | Représente si le commentaire est visible ou non. |
| [Note](../../aspose.cells/comment/note) { get; set; } | Représente le contenu du commentaire. |
| [Row](../../aspose.cells/comment/row) { get; } | Obtient l'index de ligne du commentaire. |
| [TextHorizontalAlignment](../../aspose.cells/comment/texthorizontalalignment) { get; set; } | Obtient et définit le type d'alignement horizontal du texte du commentaire. |
| [TextOrientationType](../../aspose.cells/comment/textorientationtype) { get; set; } | Obtient et définit le type d'orientation du texte du commentaire. |
| [TextVerticalAlignment](../../aspose.cells/comment/textverticalalignment) { get; set; } | Obtient et définit le type d'alignement vertical du texte du commentaire. |
| [ThreadedComments](../../aspose.cells/comment/threadedcomments) { get; } | Obtient la liste des commentaires thématiques ; |
| [Width](../../aspose.cells/comment/width) { get; set; } | Représente la largeur du commentaire, en unité de pixels. |
| [WidthCM](../../aspose.cells/comment/widthcm) { get; set; } | Représente la largeur du commentaire, en unité de centimètres. |
| [WidthInch](../../aspose.cells/comment/widthinch) { get; set; } | Représente la largeur du commentaire, en pouces. |

## Méthodes

| Nom | La description |
| --- | --- |
| [Characters](../../aspose.cells/comment/characters)(int, int) | Renvoie un objet Characters qui représente une plage de caractères dans le texte du commentaire. |
| [FormatCharacters](../../aspose.cells/comment/formatcharacters)(int, int, Font, StyleFlag) | Formatez certains caractères avec le paramètre de police. |
| [GetCharacters](../../aspose.cells/comment/getcharacters)() | Renvoie tous les objets Characters qui représentent une plage de caractères dans le texte du commentaire. |

### Exemples

```csharp
[C#]

Workbook workbook = new Workbook();
CommentCollection comments = workbook.Worksheets[0].Comments;

//Ajouter un commentaire à la cellule A1
int commentIndex1 = comments.Add(0, 0);
Comment comment1 = comments[commentIndex1];
comment1.Note = "First note.";
comment1.Font.Name = "Times New Roman";

//Ajouter un commentaire à la cellule B2
comments.Add("B2");
Comment comment2 = comments["B2"];
comment2.Note = "Second note.";

//faites vos affaires

// Enregistrez le fichier excel.
workbook.Save("exmaple.xlsx");

[Visual Basic]

Dim workbook as Workbook = new Workbook()
Dim comments as CommentCollection = workbook.Worksheets(0).Comments
 
'Ajouter un commentaire à la cellule A1
Dim commentIndex1 as Integer = comments.Add(0, 0)
Dim comment1 as Comment = comments(commentIndex1)
comment1.Note = "First note."
comment1.Font.Name = "Times New Roman"

'Ajouter un commentaire à la cellule B2
comments.Add("B2")
Dim comment2 As Comment = comments("B2")
comment2.Note = "Second note."
 
```

### Voir également

* espace de noms [Aspose.Cells](../../aspose.cells)
* Assemblée [Aspose.Cells](../../)

<!-- DO NOT EDIT: generated by xmldocmd for Aspose.Cells.dll -->
