python 倾斜水印铺满
时间: 2023-10-22 12:08:53 浏览: 78
python制作水印
要在Python中使用Aspose.Cells倾斜水印铺满,您可以使用以下代码:
```python
import aspose.cells as apc
# 实例化一个新的Workbook
workbook = apc.Workbook()
# 获取第一个默认工作表
sheet = workbook.worksheets[0]
# 添加水印
wordart = sheet.shapes.add_text_effect(apc.MsoPresetTextEffect.TextEffect1, "CONFIDENTIAL", "Arial Black", 50, False, True, 18, 8, 1, 1, 130, 800)
# 获取WordArt的填充格式
wordart_format = wordart.fill_format
# 设置颜色
wordart_format.fore_color = apc.Color.from_argb(255, 255, 0, 0) # 设置为红色
# 设置透明度
wordart_format.transparency = 0.5 # 设置为0.5
# 设置线条不可见
line_format = wordart.line_format
line_format.is_visible = False
# 保存文件
workbook.save("path/to/save/workbook.xlsx")
```
阅读全文