Determina se Shape è Smart Art Shape
Contents
[
Hide
]
Possibili scenari di utilizzo
Le Smart Art Shapes sono forme speciali in Microsoft Excel che consentono di creare automaticamente diagrammi complessi. Puoi scoprire se la forma è una forma artistica intelligente o una forma normale usandoShape.IsSmartArtproprietà.
Determina se Shape è Smart Art Shape
Il codice di esempio seguente carica il fileesempio di file Excelcontenente una forma artistica intelligente come mostrato in questo screenshot. Quindi stampa il valore diShape.IsSmartArtproprietà della prima forma. Si prega di vedere l’output della console del codice di esempio fornito di seguito.
Codice d’esempio
This file contains 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-Java | |
//Load the sample smart art shape - Excel file | |
Workbook wb = new Workbook("sampleSmartArtShape.xlsx"); | |
//Access first worksheet | |
Worksheet ws = wb.getWorksheets().get(0); | |
//Access first shape | |
Shape sh = ws.getShapes().get(0); | |
//Determine if shape is smart art | |
System.out.println("Is Smart Art Shape: " + sh.isSmartArt()); |
Uscita console
Is Smart Art Shape: true