Bir Çalışma Sayfasındaki Yorumları Yönetme
Yorum Ekleme
Aspose.Cells.GridDesktop kullanarak bir hücreye yorum eklemek için lütfen aşağıdaki adımları izleyin:
- Aspose.Cells.GridDesktop kontrolünü ekleyin.Biçim
- İstediğiniz herhangi birine erişinÇalışma kağıdı
- EklemekYorum Yap yorumun ekleneceği hücreyi (adını veya satır ve sütun numarasını kullanarak) belirterek çalışma sayfasına ekleyin.
Aşağıdaki kod, şuraya yorum ekleyecektir:b2 veb4 çalışma sayfasının hücreleri.
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Accessing first worksheet of the Grid | |
Worksheet sheet = gridDesktop1.Worksheets[0]; | |
// Adding comment to "b2" cell | |
sheet.Comments.Add("b2", "Please write your name."); | |
// Adding another comment to "b4" cell using its row & column number | |
sheet.Comments.Add(3, 1, "Please write your email."); |
Yorumlar koleksiyonundaÇalışma kağıdı nesne aşırı yükleme sağlarEklemek yöntem. Geliştiriciler, herhangi bir aşırı yüklenmiş sürümünü kullanabilirEklemek özel ihtiyaçlarına göre yöntem.
Yorumlara Erişim
Çalışma sayfasındaki mevcut bir yoruma erişmek ve üzerinde değişiklik yapmak için geliştiriciler, çalışma sayfasından yoruma erişebilir.Yorumlar koleksiyonuÇalışma kağıdı yorumun eklendiği hücreyi belirterek (hücre adını veya satır ve sütun numarası cinsinden konumunu kullanarak). Yoruma erişildikten sonra, geliştiriciler çalışma zamanında Metnini değiştirebilir.
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Accessing first worksheet of the Grid | |
Worksheet sheet = gridDesktop1.Worksheets[0]; | |
// Accessing a comment added to "c3" cell (specified using its row & column number) | |
Aspose.Cells.GridDesktop.Data.GridComment comment1 = sheet.Comments[3, 1]; | |
if (comment1 != null) | |
{ | |
// Modifying the text of comment | |
comment1.Text = "The 1st comment."; | |
MessageBox.Show("Comment has been modified"); | |
} | |
else | |
{ | |
MessageBox.Show("Please add comment before accessing it."); | |
} |
Yorumları Kaldırma
Mevcut bir yorumu kaldırmak için, geliştiriciler basitçe istenen bir çalışma sayfasına erişebilir ve ardındanKaldırmak gelen yorumYorumlar koleksiyonuÇalışma kağıdı Yorum içeren hücreyi (adını veya satır ve sütun numarasını kullanarak) belirterek.
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Accessing first worksheet of the Grid | |
Worksheet sheet = gridDesktop1.Worksheets[0]; | |
if (sheet.Comments[3, 1] != null) | |
{ | |
// Removing comment from "c3" cell | |
sheet.Comments.Remove(3, 1); | |
MessageBox.Show("Comment has been removed"); | |
} | |
else | |
{ | |
MessageBox.Show("Please add comment before removing it."); | |
} |