Node.js üzerinden C++ kullanarak şekil metnine ön ayar WordArt stili ayarlayın

Olası Kullanım Senaryoları

Aspose.Cells for Node.js via C++ kullanarak şeklin metnine ön ayar WordArt stili ayarlayabilirsiniz. Bu amaçla FontSetting.setWordArtStyle(PresetWordArtStyle) veya FontSettingCollection.setWordArtStyle(PresetWordArtStyle) metodunu kullanın.

Metin şeklinin metnine önceden ayarlanmış WordArt stili ayarlayın

Aşağıdaki örnek kod, bir metin kutusu oluşturur ve içine metin ekler, ardından metnin ön ayar WordArt stilini FontSetting.setWordArtStyle(PresetWordArtStyle) yöntemiyle ayarlar. Bu, Microsoft Excel’de çıktı excel dosyasının nasıl göründüğünü gösterir.

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");