IconSet
İçindekiler
[
Saklamak
]IconSet class
IconSet koşullu biçimlendirme kuralını açıklayın. Bu koşullu biçimlendirme kuralı, simgeleri değerlerine göre hücrelere uygular.
public class IconSet
Özellikleri
İsim | Tanım |
---|---|
CfIcons { get; } | AlınConditionalFormattingIcon koleksiyondan |
Cfvos { get; } | CFValueObjects örneğini alın. |
IsCustom { get; } | Simge setinin özel olup olmadığını gösterir. Varsayılan değer false’tur. |
Reverse { get; set; } | Bu simge setindeki simgelerin varsayılan sırasını tersine çevirip çevirmeyeceğini belirten bayrağı alın veya ayarlayın. Varsayılan değer false’tur. |
ShowValue { get; set; } | Bu simge kümesinin uygulandığı hücrelerin değerlerinin gösterilip gösterilmeyeceğini belirten bayrağı alın veya ayarlayın. Varsayılan değer true. |
Type { get; set; } | Görüntülenecek simge seti türünü alın veya ayarlayın. Türün ayarlanması, mevcut Cfvos’un sayısının yeni türle uyumlu olup olmadığını otomatik olarak kontrol edecektir. Uyum sağlanamazsa eski Cfvos temizlenecek ve varsayılan Cfvos eklenecektir. |
Örnekler
[C#]
//Bir Çalışma Kitabı nesnesini başlatma
Workbook workbook = new Workbook();
Worksheet sheet = workbook.Worksheets[0];
//Boş bir koşullu biçimlendirme ekler
int index = sheet.ConditionalFormattings.Add();
FormatConditionCollection fcs = sheet.ConditionalFormattings[index];
//Koşullu biçim aralığını ayarlar.
CellArea ca = new CellArea();
ca.StartRow = 0;
ca.EndRow = 2;
ca.StartColumn = 0;
ca.EndColumn = 0;
fcs.AddArea(ca);
//Koşul ekler.
int idx = fcs.AddCondition(FormatConditionType.IconSet);
fcs.AddArea(ca);
FormatCondition cond = fcs[idx];
// Simge Setini Al
IconSet iconSet = cond.IconSet;
// Simge Tipini Ayarla
iconSet.Type = IconSetType.Arrows3;
//Hücre Değerlerini Koy
Aspose.Cells.Cell cell1 = sheet.Cells["A1"];
cell1.PutValue(10);
Aspose.Cells.Cell cell2 = sheet.Cells["A2"];
cell2.PutValue(120);
Aspose.Cells.Cell cell3 = sheet.Cells["A3"];
cell3.PutValue(260);
//Excel dosyasını kaydetme
workbook.Save("book1.xlsx");
[VB.NET]
'Bir Çalışma Kitabı nesnesini başlatma
Dim workbook As Workbook = New Workbook()
Dim sheet As Worksheet = workbook.Worksheets(0)
'Boş bir koşullu biçimlendirme ekler
Dim index As Integer = sheet.ConditionalFormattings.Add()
Dim fcs As FormatConditionCollection = sheet.ConditionalFormattings(index)
'Koşullu biçim aralığını ayarlar.
Dim ca As New CellArea()
ca.StartRow = 0
ca.EndRow = 2
ca.StartColumn = 0
ca.EndColumn = 0
fcs.AddArea(ca)
'Koşul ekler.
Dim idx As Integer = fcs.AddCondition(FormatConditionType.IconSet)
fcs.AddArea(ca)
Dim cond As FormatCondition = fcs(idx)
'Simge Seti Alın
Dim iconSet As IconSet = cond.IconSet
'Simge Türünü Ayarla
iconSet.Type = IconSetType.Arrows3
'Hücre Değerlerini Koy
Dim cell1 As Aspose.Cells.Cell = sheet.Cells("A1")
cell1.PutValue(10)
Dim cell2 As Aspose.Cells.Cell = sheet.Cells("A2")
cell2.PutValue(120)
Dim cell3 As Aspose.Cells.Cell = sheet.Cells("A3")
cell3.PutValue(260)
'Excel dosyasını kaydetme
workbook.Save("book1.xlsx")
Ayrıca bakınız
- ad alanı Aspose.Cells
- toplantı Aspose.Cells