Class CommentCollection

Class CommentCollection

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

Kapselt eine Sammlung von Aspose.Cells.Comment-Objekten.

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

Vererbung

objectCollectionBase<comment>CommentCollection

Implementiert

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

Vererbte Mitglieder

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()

Beispiele

Workbook workbook = new Workbook();

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

//machen Sie Ihre Geschäfte
Dim workbook as Workbook = new Workbook()

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

Eigenschaften

this[int]

Erhält das Aspose.Cells.Comment-Element am angegebenen Index.

public Comment this[int index] { get; }

Eigenschaftenwert

Comment

Beispiele

Comment comment3 = comments[0];
comment3.Note = "Drei Notiz.";

this[string]

Erhält das Aspose.Cells.Comment-Element an der angegebenen Zelle.

public Comment this[string cellName] { get; }

Eigenschaftenwert

Comment

Beispiele

Comment comment4 = comments["B2"];
comment4.Note = "Vier Notiz.";

this[int, int]

Erhält das Aspose.Cells.Comment-Element am angegebenen Zeilen- und Spaltenindex.

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

Eigenschaftenwert

Comment

Beispiele

Comment comment5 = comments[1,1];
comment5.Note = "Fünf Notiz.";

Methoden

Add(int, int)

Fügt einen Kommentar zur Sammlung hinzu.

public int Add(int row, int column)

Parameter

row int

Zellenzeilenindex.

column int

Zellenspaltenindex.

Gibt zurück

int

Index des Aspose.Cells.Comment-Objekts.

Beispiele

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

Add(string)

Fügt einen Kommentar zur Sammlung hinzu.

public int Add(string cellName)

Parameter

cellName string

Zellenname.

Gibt zurück

int

Index des Aspose.Cells.Comment-Objekts.

Beispiele

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

AddThreadedComment(int, int, string, ThreadedCommentAuthor)

Fügt einen verknüpften Kommentar hinzu.

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

Parameter

row int

Zellenzeilenindex.

column int

Zellenspaltenindex.

text string

Der Text des Kommentars.

author ThreadedCommentAuthor

Der Benutzer dieses verknüpften Kommentars.

Gibt zurück

int

Index des Aspose.Cells.ThreadedComment-Objekts.

AddThreadedComment(string, string, ThreadedCommentAuthor)

Fügt einen verknüpften Kommentar hinzu.

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

Parameter

cellName string

Der Name der Zelle.

text string

Der Text des Kommentars.

author ThreadedCommentAuthor

Der Benutzer dieses verknüpften Kommentars.

Gibt zurück

int

Index des Aspose.Cells.ThreadedComment-Objekts.

Clear()

Entfernt alle Kommentare;

public void Clear()

Beispiele

comments.Clear();

GetThreadedComments(int, int)

Erhält die verknüpften Kommentare nach Zeilen- und Spaltenindex.

public ThreadedCommentCollection GetThreadedComments(int row, int column)

Parameter

row int

Der Zeilenindex.

column int

Der Spaltenindex.

Gibt zurück

ThreadedCommentCollection

Beispiele

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)

Erhält die verknüpften Kommentare nach Zellenname.

public ThreadedCommentCollection GetThreadedComments(string cellName)

Parameter

cellName string

Der Name der Zelle.

Gibt zurück

ThreadedCommentCollection

Beispiele

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

RemoveAt(string)

Entfernt den Kommentar der spezifischen Zelle.

public void RemoveAt(string cellName)

Parameter

cellName string

Der Name der Zelle, die einen Kommentar enthält.

Beispiele

comments.RemoveAt("B2");

RemoveAt(int, int)

Entfernt den Kommentar der spezifischen Zelle.

public void RemoveAt(int row, int column)

Parameter

row int

Der Zeilenindex.

column int

Der Spaltenindex.

Beispiele

comments.RemoveAt(1,1);
 Deutsch