SpreadsheetWatermarkHeaderFooterOptions class
Leave feedback
On this page
Represents options when adding the watermark to a Spreadsheet header/footer.
Learn more:
The SpreadsheetWatermarkHeaderFooterOptions type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new SpreadsheetWatermarkHeaderFooterOptions instance. |
| Property | Description |
|---|---|
| worksheet_index | The index of the worksheet to add the watermark to. |
| Field | Description |
|---|---|
| DEFAULT | Gets the default value for the class. (inherited from WatermarkOptions) |
import groupdocs.watermark as gw
import groupdocs.watermark.watermarks as gww
import groupdocs.watermark.options.spreadsheet as gwo_xls
import groupdocs.watermark.common as gwc
load_options = gw.SpreadsheetLoadOptions()
with gw.Watermarker("spreadsheet.xlsx", load_options) as watermarker:
watermark = gww.TextWatermark(
"Test watermark",
gww.Font("Segoe UI", 19.0, gww.FontStyle.BOLD)
)
watermark.foreground_color = gww.Color.red
watermark.background_color = gww.Color.aqua
watermark.vertical_alignment = gwc.VerticalAlignment.TOP
watermark.horizontal_alignment = gwc.HorizontalAlignment.CENTER
options = gwo_xls.SpreadsheetWatermarkHeaderFooterOptions()
options.worksheet_index = 0
watermarker.add(watermark, options)
watermarker.save("spreadsheet.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.