العمل مع تأثير الظل للشكل أو المخطط مع Node.js عبر C++

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

يوفر Aspose.Cells for Node.js via C++ الخاصية Shape.getShadowEffect() بالإضافة إلى فئة ShadowEffect للعمل مع تأثير الظل للشكل أو المخطط. تحتوي فئة ShadowEffect على الخصائص التالية والتي يمكن ضبطها لتحقيق نتائج مختلفة حسب متطلبات التطبيق.

العمل مع تأثير الظل للشكل أو الرسم البياني

يعتمد الرمز النموذجي التالي على تحميل ملف إكسل المصدر (5115425.xlsx) والوصول إلى الشكل الأول في ورقة العمل الأولى وضبط خصائص فرعية من الخاصية Shape.getShadowEffect() ثم يحفظ دفتر العمل في ملف إكسل الإخراج (5115411.xlsx).

const path = require("path");
const AsposeCells = require("aspose.cells.node");

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "sample.xlsx");
// Load your source excel file
const workbook = new AsposeCells.Workbook(filePath);

// Access first worksheet
const worksheet = workbook.getWorksheets().get(0);

// Access first shape
const shape = worksheet.getShapes().get(0);

// Set the shadow effect of the shape, set its Angle, Blur, Distance and Transparency properties
const shadowEffect = shape.getShadowEffect();
shadowEffect.setAngle(150);
shadowEffect.setBlur(4);
shadowEffect.setDistance(45);
shadowEffect.setTransparency(0.3);

// Save the workbook in xlsx format
workbook.save(path.join(dataDir, "output_out.xlsx"));