Class CommentCollection

Class CommentCollection

Namespace: Aspose.Cells
Assembly: Aspose.Cells.dll (25.2.0)

Encapsula una colección de objetos Aspose.Cells.Comment.

public class CommentCollection : CollectionBase<comment>, IList<comment>, ICollection<comment>, IEnumerable<comment>, ICollection, IEnumerable

Herencia

objectCollectionBase<comment>CommentCollection

Implementa

IList<comment>, ICollection<comment>, IEnumerable<comment>, ICollection, IEnumerable

Miembros heredados

CollectionBase<comment>.BinarySearch(Comment), CollectionBase<comment>.BinarySearch(Comment, IComparer<comment>), CollectionBase<comment>.BinarySearch(int, int, Comment, IComparer<comment>), CollectionBase<comment>.Contains(Comment), CollectionBase<comment>.CopyTo(Comment[]), CollectionBase<comment>.CopyTo(Comment[], int), CollectionBase<comment>.CopyTo(int, Comment[], int, int), CollectionBase<comment>.Exists(Predicate<comment>), CollectionBase<comment>.Find(Predicate<comment>), CollectionBase<comment>.FindAll(Predicate<comment>), CollectionBase<comment>.FindIndex(Predicate<comment>), CollectionBase<comment>.FindIndex(int, Predicate<comment>), CollectionBase<comment>.FindIndex(int, int, Predicate<comment>), CollectionBase<comment>.FindLast(Predicate<comment>), CollectionBase<comment>.FindLastIndex(Predicate<comment>), CollectionBase<comment>.FindLastIndex(int, Predicate<comment>), CollectionBase<comment>.FindLastIndex(int, int, Predicate<comment>), CollectionBase<comment>.IndexOf(Comment), CollectionBase<comment>.IndexOf(Comment, int), CollectionBase<comment>.IndexOf(Comment, int, int), CollectionBase<comment>.LastIndexOf(Comment), CollectionBase<comment>.LastIndexOf(Comment, int), CollectionBase<comment>.LastIndexOf(Comment, int, int), CollectionBase<comment>.GetEnumerator(), CollectionBase<comment>.Clear(), CollectionBase<comment>.RemoveAt(int), CollectionBase<comment>.OnClearComplete(), CollectionBase<comment>.OnClear(), CollectionBase<comment>.Capacity, CollectionBase<comment>.Count, CollectionBase<comment>.InnerList, CollectionBase<comment>.this[int], object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Ejemplos

Workbook workbook = new Workbook();

CommentCollection comments = workbook.Worksheets[0].Comments;

//realiza tu tarea
Dim workbook as Workbook = new Workbook()

Dim comments as CommentCollection = workbook.Worksheets(0).Comments

Propiedades

this[int]

Obtiene el elemento Aspose.Cells.Comment en el índice especificado.

public Comment this[int index] { get; }

Valor de la propiedad

Comment

Ejemplos

Comment comment3 = comments[0];
comment3.Note = "Nota tres.";

this[string]

Obtiene el elemento Aspose.Cells.Comment en la celda especificada.

public Comment this[string cellName] { get; }

Valor de la propiedad

Comment

Ejemplos

Comment comment4 = comments["B2"];
comment4.Note = "Nota cuatro.";

this[int, int]

Obtiene el elemento Aspose.Cells.Comment en el índice de fila y columna especificados.

public Comment this[int row, int column] { get; }

Valor de la propiedad

Comment

Ejemplos

Comment comment5 = comments[1,1];
comment5.Note = "Nota cinco.";

Métodos

Add(int, int)

Agrega un comentario a la colección.

public int Add(int row, int column)

Parámetros

row int

Índice de fila de la celda.

column int

Índice de columna de la celda.

Retorna

int

Índice del objeto Aspose.Cells.Comment.

Ejemplos

int commentIndex1 = comments.Add(0, 0);
Comment comment1 = comments[commentIndex1];
comment1.Note = "Primera nota.";
comment1.Font.Name = "Times New Roman";

Add(string)

Agrega un comentario a la colección.

public int Add(string cellName)

Parámetros

cellName string

Nombre de la celda.

Retorna

int

Índice del objeto Aspose.Cells.Comment.

Ejemplos

int commentIndex2 = comments.Add("B2");
Comment comment2 = comments[commentIndex2];
comment2.Note = "Segunda nota.";
comment2.Font.Name = "Times New Roman";

AddThreadedComment(int, int, string, ThreadedCommentAuthor)

Agrega un comentario en hilo.

public int AddThreadedComment(int row, int column, string text, ThreadedCommentAuthor author)

Parámetros

row int

Índice de fila de la celda.

column int

Índice de columna de la celda.

text string

El texto del comentario.

author ThreadedCommentAuthor

El usuario de este comentario en hilo.

Retorna

int

Índice del objeto Aspose.Cells.ThreadedComment.

AddThreadedComment(string, string, ThreadedCommentAuthor)

Agrega un comentario en hilo.

public int AddThreadedComment(string cellName, string text, ThreadedCommentAuthor author)

Parámetros

cellName string

El nombre de la celda.

text string

El texto del comentario.

author ThreadedCommentAuthor

El usuario de este comentario en hilo.

Retorna

int

Índice del objeto Aspose.Cells.ThreadedComment.

Clear()

Elimina todos los comentarios;

public void Clear()

Ejemplos

comments.Clear();

GetThreadedComments(int, int)

Obtiene los comentarios en hilo por índice de fila y columna.

public ThreadedCommentCollection GetThreadedComments(int row, int column)

Parámetros

row int

El índice de fila.

column int

El índice de columna.

Retorna

ThreadedCommentCollection

Ejemplos

ThreadedCommentCollection threadedComments1 = comments.GetThreadedComments(1, 1);
for (int i = 0; i &lt; threadedComments1.Count; ++i)
{
    ThreadedComment tc = threadedComments1[i];
    string note = tc.Notes;
}

GetThreadedComments(string)

Obtiene los comentarios en hilo por nombre de celda.

public ThreadedCommentCollection GetThreadedComments(string cellName)

Parámetros

cellName string

El nombre de la celda.

Retorna

ThreadedCommentCollection

Ejemplos

ThreadedCommentCollection threadedComments2 = comments.GetThreadedComments("B2");
for (int i = 0; i &lt; threadedComments2.Count; ++i)
{
    ThreadedComment tc = threadedComments2[i];
    string note = tc.Notes;
}

RemoveAt(string)

Elimina el comentario de la celda específica.

public void RemoveAt(string cellName)

Parámetros

cellName string

El nombre de la celda que contiene un comentario.

Ejemplos

comments.RemoveAt("B2");

RemoveAt(int, int)

Elimina el comentario de la celda específica.

public void RemoveAt(int row, int column)

Parámetros

row int

El índice de fila.

column int

El índice de columna.

Ejemplos

comments.RemoveAt(1,1);
 Español