Smart Art をグループ シェイプに変換する
Contents
[
Hide
]
考えられる使用シナリオ
を使用してスマート アート シェイプをグループ シェイプに変換できます。[Shape.getResultOfSmartArt()](https://reference.aspose.com/cells/java/com.aspose.cells/shape#getResultOfSmartArt()) 方法。グループシェイプのようなスマートなアートシェイプを扱えるようになります。したがって、グループ シェイプの個々のパーツまたはシェイプにアクセスできます。
Smart Art をグループ シェイプに変換する
次のサンプル コードは、サンプル Excel ファイルこのスクリーンショットに示すように、スマート アート シェイプが含まれています。次に、スマート アート シェイプをグループ シェイプに変換し、Shape.IsGroup財産。以下に示すサンプル コードのコンソール出力を参照してください。
サンプルコード
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_GetResultOfSmartArt.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()); | |
//Determine if shape is group shape | |
System.out.println("Is Group Shape: " + sh.isGroup()); | |
//Convert smart art shape into group shape | |
System.out.println("Is Group Shape: " + sh.getResultOfSmartArt().isGroup()); |
コンソール出力
Is Smart Art Shape: true
Is Group Shape: false
Is Group Shape: true