シェイプがスマート アート シェイプかどうかを判断する
Contents
[
Hide
]
考えられる使用シナリオ
スマート アート シェイプは、複雑な図を自動的に作成できる Microsoft Excel の特殊な図形です。を使用して、形状がスマート アート形状か通常の形状かを確認できます。Shape.IsSmartArt財産。
シェイプがスマート アート シェイプかどうかを判断する
次のサンプル コードは、サンプル Excel ファイルこのスクリーンショットに示すように、スマート アート シェイプが含まれています。次に、の値を出力しますShape.IsSmartArt最初の形状のプロパティ。以下に示すサンプル コードのコンソール出力を参照してください。
サンプルコード
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()); |
コンソール出力
Is Smart Art Shape: true