Determine if Shape is Smart Art Shape with Node.js via C++
Possible Usage Scenarios
Smart Art Shapes are special shapes in Microsoft Excel that allow you to create complex diagrams automatically. You can find if the shape is a smart art shape or normal shape using Shape.isSmartArt() property.
Determine if Shape is Smart Art Shape
The following sample code loads the sample Excel file containing a smart art shape as shown in this screenshot. It then prints the value of Shape.isSmartArt() property of the first shape. Please see the console output of the sample code given below.
Sample Code
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());
Console Output
Is Smart Art Shape: True