العمل مع ثلاثة الأبعاد من الشكل أو الرسم البياني

سيناريوهات الاستخدام المحتملة

توفر Aspose.Cells خاصية Shape.ThreeDFormat للعمل مع تنسيق ثلاثي الأبعاد للشكل أو الرسم البياني. تحتوي على خصائص فرعية مختلفة يمكنك تعيينها لتحقيق نتائج مختلفة وفقًا لاحتياجاتك.

توضح اللقطة الشاشية التالية واجهة Microsoft Excel لتعيين تنسيق ثلاثي الأبعاد للشكل.

todo:image_alt_text

العمل مع ثلاثة الأبعاد من الشكل أو الرسم البياني

الكود النموذجي التالي يقوم بتحميل ملف الإكسل المصدر والوصول إلى الشكل الأول في الورقة العمل الأولى وتعيين الخصائص الفرعية لخاصية Shape.ThreeDFormat ومن ثم حفظ المصنف في ملف الإكسل الناتج.

الكود المثالي

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
// The path to the documents directory.
String dataDir = Utils.getSharedDataDir(WorkingWithThreeDFormat.class) + "articles/";
//Load excel file containing a shape
Workbook wb = new Workbook(dataDir + "WorkingWithThreeDFormat_in.xlsx");
//Access first worksheet
Worksheet ws = wb.getWorksheets().get(0);
//Access first shape
Shape sh = ws.getShapes().get(0);
//Apply different three dimensional settings
ThreeDFormat n3df = sh.getThreeDFormat();
n3df.setContourWidth(17);
n3df.setExtrusionHeight(32);
n3df.setTopBevelType(BevelType.HARD_EDGE);
n3df.setTopBevelWidth (30);
n3df.setTopBevelHeight(30);
//Save the output excel file in xlsx format
wb.save(dataDir + "WorkingWithThreeDFormat_out.xlsx");