SpreadsheetWatermarkHeaderFooterOptions class

SpreadsheetWatermarkHeaderFooterOptions class

Represents options when adding the watermark to a Spreadsheet header/footer.

Learn more:

The SpreadsheetWatermarkHeaderFooterOptions type exposes the following members:

Constructors

Constructor Description
init Initializes a new SpreadsheetWatermarkHeaderFooterOptions instance.

Properties

Property Description
worksheet_index The index of the worksheet to add the watermark to.

Fields

Field Description
DEFAULT Gets the default value for the class. (inherited from WatermarkOptions)

Example

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")

See Also