SpreadsheetWatermarkShapeOptions class
Leave feedback
On this page
Represents options when adding shape watermark to a Spreadsheet worksheet.
Learn more:
- Add watermarks to spreadsheet documents (https://docs.groupdocs.com/display/watermarknet/Add+watermarks+to+spreadsheet+documents)
The SpreadsheetWatermarkShapeOptions type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new instance of the SpreadsheetWatermarkShapeOptions class. |
| Property | Description |
|---|---|
| effects | The effects applied to the watermark, specified as a SpreadsheetImageEffects or SpreadsheetTextEffects instance. |
| worksheet_index | The index of the worksheet to add the watermark to. |
| alternative_text | The descriptive (alternative) text that will be associated with a shape. (inherited from SpreadsheetWatermarkBaseOptions) |
| is_locked | The property indicates whether editing of the shape in Excel is forbidden. (inherited from SpreadsheetWatermarkBaseOptions) |
| name | The name of the shape. (inherited from SpreadsheetWatermarkBaseOptions) |
| Field | Description |
|---|---|
| DEFAULT | Gets the default value for the class. (inherited from WatermarkOptions) |
from groupdocs.watermark import Watermarker
from groupdocs.watermark.watermarks import TextWatermark, Font, Color
from groupdocs.watermark.common import HorizontalAlignment, VerticalAlignment
from groupdocs.watermark.options.spreadsheet import (
SpreadsheetLoadOptions, SpreadsheetWatermarkShapeOptions,
)
def add_watermark_to_worksheet():
with Watermarker("./spreadsheet.xlsx", SpreadsheetLoadOptions()) as watermarker:
watermark = TextWatermark("CONFIDENTIAL", Font("Arial", 19.0))
watermark.foreground_color = Color.red
watermark.horizontal_alignment = HorizontalAlignment.CENTER
watermark.vertical_alignment = VerticalAlignment.CENTER
options = SpreadsheetWatermarkShapeOptions()
options.worksheet_index = 0
watermarker.add(watermark, options)
watermarker.save("./output.xlsx")
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.