Çalışma Sayfasına WordArt Filigran Ekleyin

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.

from aspose.cells import Workbook
from aspose.cells.drawing import MsoPresetTextEffect
from os import os, path
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
# The path to the documents directory.
dataDir = RunExamples.GetDataDir(".")
# Create directory if it is not already present.
IsExists = path.isdir(dataDir)
if notIsExists:
os.makedirs(dataDir)
# Instantiate a new Workbook
workbook = Workbook()
# Get the first default sheet
sheet = workbook.worksheets[0]
# Add Watermark
wordart = sheet.shapes.add_text_effect(MsoPresetTextEffect.TEXT_EFFECT1, "CONFIDENTIAL", "Arial Black", 50, False, true
, 18, 8, 1, 1, 130, 800)
# Get the fill format of the word art
wordArtFormat = wordart.fill
# Set the transparency
wordArtFormat.transparency = 0.9
# Make the line invisible
lineFormat = wordart.line
dataDir = dataDir + "Watermark_Test.out.xls"
# Save the file
workbook.save(dataDir)

Gelişmiş Konular