Class CommentCollection
Namespace: Aspose.Cells
Assembly: Aspose.Cells.dll (25.2.0)
Aspose.Cells.Comment 객체 컬렉션을 캡슐화합니다.
public class CommentCollection : CollectionBase<comment>, IList<comment>, ICollection<comment>, IEnumerable<comment>, ICollection, IEnumerable
상속
object ← CollectionBase<comment> ← CommentCollection
구현
IList<comment>, ICollection<comment>, IEnumerable<comment>, ICollection, IEnumerable
상속된 멤버
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()
예제
Workbook workbook = new Workbook();
CommentCollection comments = workbook.Worksheets[0].Comments;
//비즈니스 로직을 수행하세요
Dim workbook as Workbook = new Workbook()
Dim comments as CommentCollection = workbook.Worksheets(0).Comments
속성
this[int]
지정된 인덱스의 Aspose.Cells.Comment 요소를 가져옵니다.
public Comment this[int index] { get; }
속성 값
예제
Comment comment3 = comments[0];
comment3.Note = "세 번째 메모.";
this[string]
지정된 셀의 Aspose.Cells.Comment 요소를 가져옵니다.
public Comment this[string cellName] { get; }
속성 값
예제
Comment comment4 = comments["B2"];
comment4.Note = "네 번째 메모.";
this[int, int]
지정된 행 인덱스와 열 인덱스의 Aspose.Cells.Comment 요소를 가져옵니다.
public Comment this[int row, int column] { get; }
속성 값
예제
Comment comment5 = comments[1,1];
comment5.Note = "다섯 번째 메모.";
메서드
Add(int, int)
컬렉션에 주석을 추가합니다.
public int Add(int row, int column)
매개변수
row
int
셀 행 인덱스.
column
int
셀 열 인덱스.
반환
Aspose.Cells.Comment 객체 인덱스.
예제
int commentIndex1 = comments.Add(0, 0);
Comment comment1 = comments[commentIndex1];
comment1.Note = "첫 번째 메모.";
comment1.Font.Name = "Times New Roman";
Add(string)
컬렉션에 주석을 추가합니다.
public int Add(string cellName)
매개변수
cellName
string
셀 이름.
반환
Aspose.Cells.Comment 객체 인덱스.
예제
int commentIndex2 = comments.Add("B2");
Comment comment2 = comments[commentIndex2];
comment2.Note = "두 번째 메모.";
comment2.Font.Name = "Times New Roman";
AddThreadedComment(int, int, string, ThreadedCommentAuthor)
스레드 주석을 추가합니다.
public int AddThreadedComment(int row, int column, string text, ThreadedCommentAuthor author)
매개변수
row
int
셀 행 인덱스.
column
int
셀 열 인덱스.
text
string
주석의 텍스트
author
ThreadedCommentAuthor
이 스레드 주석의 사용자.
반환
Aspose.Cells.ThreadedComment 객체 인덱스.
AddThreadedComment(string, string, ThreadedCommentAuthor)
스레드 주석을 추가합니다.
public int AddThreadedComment(string cellName, string text, ThreadedCommentAuthor author)
매개변수
cellName
string
셀의 이름.
text
string
주석의 텍스트
author
ThreadedCommentAuthor
이 스레드 주석의 사용자.
반환
Aspose.Cells.ThreadedComment 객체 인덱스.
Clear()
모든 주석을 제거합니다;
public void Clear()
예제
comments.Clear();
GetThreadedComments(int, int)
행 및 열 인덱스에 따라 스레드 주석을 가져옵니다.
public ThreadedCommentCollection GetThreadedComments(int row, int column)
매개변수
row
int
행 인덱스.
column
int
열 인덱스.
반환
예제
ThreadedCommentCollection threadedComments1 = comments.GetThreadedComments(1, 1);
for (int i = 0; i < threadedComments1.Count; ++i)
{
ThreadedComment tc = threadedComments1[i];
string note = tc.Notes;
}
GetThreadedComments(string)
셀 이름에 따라 스레드 주석을 가져옵니다.
public ThreadedCommentCollection GetThreadedComments(string cellName)
매개변수
cellName
string
셀의 이름.
반환
예제
ThreadedCommentCollection threadedComments2 = comments.GetThreadedComments("B2");
for (int i = 0; i < threadedComments2.Count; ++i)
{
ThreadedComment tc = threadedComments2[i];
string note = tc.Notes;
}
RemoveAt(string)
특정 셀의 주석을 제거합니다.
public void RemoveAt(string cellName)
매개변수
cellName
string
주석이 포함된 셀의 이름.
예제
comments.RemoveAt("B2");
RemoveAt(int, int)
특정 셀의 주석을 제거합니다.
public void RemoveAt(int row, int column)
매개변수
row
int
행 인덱스.
column
int
열 인덱스.
예제
comments.RemoveAt(1,1);