Working with the ThreeDFormat of Shape or Chart with Node.js via C++

Possible Usage Scenarios

Aspose.Cells for Node.js via C++ provides the Shape.getThreeDFormat() property along with ThreeDFormat class to work with the 3-D Format of shape or chart. The ThreeDFormat class contains different properties which can be set to achieve different results as per application requirements.

Working with the ThreeDFormat of Shape or Chart

The following sample code loads the source excel file and accesses the first shape in the first worksheet and sets the sub-properties of Shape.getThreeDFormat() property and then saves the workbook in the output excel file.

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 excel file containing a shape
const wb = new AsposeCells.Workbook(filePath);

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

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

// Apply different three dimensional settings
const n3df = sh.getThreeDFormat();
n3df.setContourWidth(17);
n3df.setExtrusionHeight(32);

// Save the output excel file in xlsx format
wb.save(path.join(dataDir, "output_out.xlsx"));