Agregar un marcado de agua de WordArt a la hoja de cálculo

Contents
[ ]

El siguiente ejemplo muestra cómo agregar una forma WordArt para establecer una marca de agua de fondo para una hoja de cálculo.

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)

Temas avanzados