Leggi Colore dell'effetto bagliore della forma
Contents
[
Hide
]
Possibili scenari di utilizzo
Se vuoi leggere il colore dell’effetto bagliore di qualsiasi forma, usa ilForma.Glow.Colorproprietà. Ti aiuterà a trovare le varie proprietà relative al colore dell’effetto bagliore della forma.
Leggi il colore dell’effetto bagliore della forma
Si prega di vedere il seguente codice di esempio e il suofile excel di origine l’output della console come riferimento. Lo screenshot seguente mostra l’effetto bagliore della forma all’interno del file excel di origine quando viene visualizzato in Microsoft Excel.
C# codice per leggere il colore delle forme effetto bagliore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
// Read the source excel file | |
Workbook book = new Workbook(dataDir + "sourceGlowEffectColor.xlsx"); | |
// Access first worksheet | |
Worksheet sheet = book.Worksheets[0]; | |
// Access the shape | |
Shape shape = sheet.Shapes[0]; | |
// Read the glow effect color and its various properties | |
GlowEffect effect = shape.Glow; | |
CellsColor color = effect.Color; | |
Console.WriteLine("Color: " + color.Color); | |
Console.WriteLine("ColorIndex: " + color.ColorIndex); | |
Console.WriteLine("IsShapeColor: " + color.IsShapeColor); | |
Console.WriteLine("Transparency: " + color.Transparency); | |
Console.WriteLine("Type: " + color.Type); |
Uscita console
Ecco l’output della console del codice di esempio precedente quando eseguito con il file fornitofile excel di origine.
Color: Color [A=222, R=255, G=0, B=0]ColorIndex: 16711672
IsShapeColor: True
Transparency: 0.13
Type: RGB