أضف نص الفن الكلمة باستخدام أنماط مدمجة باستخدام Node.js عبر C++
Contents
[
Hide
]
سيناريوهات الاستخدام المحتملة
يمكنك إضافة نص الفن الكلمة باستخدام الأنماط المدمجة باستخدام Aspose.Cells for Node.js via C++. يرجى استخدام الطريقة ShapeCollection.addWordArt() لهذا الغرض.
إضافة نص Word Art بأنماط مدمجة
يقوم الكود النموذجي التالي بإضافة نصوص فنية بأنماط مدمجة مختلفة. يُرجى التحقق من ملف الإكسل الناتج الذي تم إنشاؤه بهذا الكود. هكذا يبدو ملف الإكسل الناتج في Microsoft Excel.
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");
// Loads the workbook which contains hidden external links
const wb = new AsposeCells.Workbook();
// Access first worksheet
const ws = wb.getWorksheets().get(0);
// Add Word Art Text with Built-in Styles
ws.getShapes().addWordArt(AsposeCells.PresetWordArtStyle.WordArtStyle1, "Aspose File Format APIs", 0, 0, 0, 0, 100, 800);
ws.getShapes().addWordArt(AsposeCells.PresetWordArtStyle.WordArtStyle2, "Aspose File Format APIs", 10, 0, 0, 0, 100, 800);
ws.getShapes().addWordArt(AsposeCells.PresetWordArtStyle.WordArtStyle3, "Aspose File Format APIs", 20, 0, 0, 0, 100, 800);
ws.getShapes().addWordArt(AsposeCells.PresetWordArtStyle.WordArtStyle4, "Aspose File Format APIs", 30, 0, 0, 0, 100, 800);
ws.getShapes().addWordArt(AsposeCells.PresetWordArtStyle.WordArtStyle5, "Aspose File Format APIs", 40, 0, 0, 0, 100, 800);
// Save the workbook in xlsx format
wb.save(path.join(dataDir, "output_out.xlsx"));