Çalışma Sayfasına WordArt Filigran Ekleyin
Contents
[
Hide
]
Metin efektleri eklemek için WordArt’ı kullanın. Örneğin, bir başlığı dosyanın üst kısmında uzatabilir, metni süsleyebilir ve metni önceden ayarlanmış bir şekile sığacak şekilde yapabilir veya metni bir Excel çalışma sayfasına arka plan filigranı olarak uygulayabilirsiniz. WordArt, hareket ettirebileceğiniz bir nesne haline gelir veya sayfalara dekorasyon eklemek için konumlandırabilirsiniz.
Çalışma Sayfasına WordArt Filigranı Ekleme
Aşağıdaki örnek, bir çalışma sayfası için arka plan filigranı olarak bir WordArt şekli eklemenin nasıl yapıldığını göstermektedir.
Kod çalıştırıldıktan sonra çıktı dosyası soluk kırmızı bir WordArt filigranı içerir.
Çıkış dosyası
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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(AddWordArtWatermarkToWorksheet.class) + "articles/"; | |
// Instantiate a new Workbook | |
Workbook workbook = new Workbook(); | |
// Get the first default sheet | |
Worksheet sheet = workbook.getWorksheets().get(0); | |
// Add Watermark | |
Shape wordart = sheet.getShapes().addTextEffect(MsoPresetTextEffect.TEXT_EFFECT_1, "CONFIDENTIAL", | |
"Arial Black", 50, false, true, 18, 8, 1, 1, 130, 800); | |
// Get the fill format of the word art | |
FillFormat wordArtFormat = wordart.getFill(); | |
// Set the color | |
wordArtFormat.setOneColorGradient(Color.getRed(), 0.2, GradientStyleType.HORIZONTAL, 2); | |
// Set the transparency | |
wordArtFormat.setTransparency(0.9); | |
// Make the line invisible | |
LineFormat lineFormat = wordart.getLine(); | |
lineFormat.setWeight(0.0); | |
// Save the file | |
workbook.save(dataDir + "AWArtWToWorksheet_out.xls"); |