Set preset WordArt style to the text of the shape with Node.js via C++

Possible Usage Scenarios

You can set a preset WordArt style to the text of the shape using Aspose.Cells for Node.js via C++. Please use FontSetting.setWordArtStyle(PresetWordArtStyle) or FontSettingCollection.setWordArtStyle(PresetWordArtStyle) methods for this purpose.

Set preset WordArt style to the text of the shape

The following sample code creates a text box with some text and then sets the preset WordArt style of its text using FontSetting.setWordArtStyle(PresetWordArtStyle) method. This is how the output excel file looks in Microsoft Excel.

todo:image_alt_text

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

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const outputDir = path.join(__dirname, "output");

// Create workbook object
const workbook = new AsposeCells.Workbook();

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

// Create a textbox with some text
const textbox = worksheet.getShapes().addTextBox(0, 0, 0, 0, 100, 700);
textbox.setText("Aspose File Format APIs");
textbox.getFont().setSize(44);

// Sets preset WordArt style to the text of the shape.
const fntSetting = textbox.getRichFormattings()[0];
fntSetting.setWordArtStyle(AsposeCells.PresetWordArtStyle.WordArtStyle3);

// Save the workbook in xlsx format
workbook.save(outputDir + "outputSetPresetWordArtStyle.xlsx");