تحويل الفن الذكي إلى شكل المجموعة
Contents
[
Hide
]
سيناريوهات الاستخدام الممكنة
يمكنك تحويل Smart Art Shape إلى Group Shape باستخدام ملفShape.getResultOfSmartArt () طريقة. سيمكنك من التعامل مع شكل فني ذكي مثل شكل مجموعة. وبالتالي ، سيكون لديك حق الوصول إلى الأجزاء أو الأشكال الفردية لشكل المجموعة.
تحويل الفن الذكي إلى شكل المجموعة
يقوم نموذج التعليمات البرمجية التالي بتحميل ملفنموذج لملف Excelتحتوي على شكل فني ذكي كما هو موضح في لقطة الشاشة هذه. ثم يحول الشكل الفني الذكي إلى شكل مجموعة ويطبع ملفالشكلخاصية. يرجى الاطلاع على إخراج وحدة التحكم لعينة التعليمات البرمجية الواردة أدناه.
عينة من الرموز
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