تحديد ما إذا كان الشكل هو شكل فن ذكي باستخدام Node.js عبر C++

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

أشكال الفن الذكي هي أشكال خاصة في مايكروسوفت إكسل تتيح لك إنشاء مخططات معقدة تلقائياً. يمكنك معرفة ما إذا كان الشكل هو شكل فن ذكي أو شكل عادي باستخدام خاصية Shape.isSmartArt().

تحديد ما إذا كان الشكل هو شكل ذكاء ذكي

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

todo:image_alt_text

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

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, "sampleSmartArtShape.xlsx");

// Load the sample smart art shape - 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);

// Determine if shape is smart art
console.log("Is Smart Art Shape: " + shape.isSmartArt());

مخرجات الوحدة

  

Is Smart Art Shape: True