Aggiungi testo Word Art con stili incorporati

Possibili scenari di utilizzo

È possibile aggiungere testo Word Art con stili incorporati utilizzando Aspose.Cells. Si prega di utilizzareShapeCollection.AddWordArt() metodo per questo scopo.

Aggiungi testo Word Art con stili incorporati

Il seguente codice di esempio aggiunge testi Word Art con diversi stili incorporati. Si prega di controllarefile excel di output generato con questo codice. Questo è come ilfile excel di outputcerca in Microsoft Excel.

cose da fare:immagine_alt_testo

Codice d’esempio

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
// The path to the documents directory.
String dataDir = Utils.getSharedDataDir(AddWordArtText.class) + "articles/";
// Create workbook object
Workbook wb = new Workbook();
// Access first worksheet
Worksheet ws = wb.getWorksheets().get(0);
// Add Word Art Text with Built-in Styles
ws.getShapes().addWordArt(PresetWordArtStyle.WORD_ART_STYLE_1, "Aspose File Format APIs", 00, 0, 0, 0, 100, 800);
ws.getShapes().addWordArt(PresetWordArtStyle.WORD_ART_STYLE_2, "Aspose File Format APIs", 10, 0, 0, 0, 100, 800);
ws.getShapes().addWordArt(PresetWordArtStyle.WORD_ART_STYLE_3, "Aspose File Format APIs", 20, 0, 0, 0, 100, 800);
ws.getShapes().addWordArt(PresetWordArtStyle.WORD_ART_STYLE_4, "Aspose File Format APIs", 30, 0, 0, 0, 100, 800);
ws.getShapes().addWordArt(PresetWordArtStyle.WORD_ART_STYLE_5, "Aspose File Format APIs", 40, 0, 0, 0, 100, 800);
// Save the workbook in xlsx format
wb.save(dataDir + "AddWordArtText_out.xlsx");