SpreadsheetBackgroundWatermarkOptions class
Leave feedback
On this page
SpreadsheetBackgroundWatermarkOptions class
Represents options when adding the watermark as a background to a Spreadsheet worksheet.
Use this class to specify the target worksheet (via worksheet_index) and the size of the background area (via background_width and background_height) for a watermark.
Gets the default value for the class. (inherited from WatermarkOptions)
Example
importgroupdocs.watermarkasgwimportgroupdocs.watermark.watermarksasgwwimportgroupdocs.watermark.options.spreadsheetasgwo_xlsload_options=gw.SpreadsheetLoadOptions()withgw.Watermarker("spreadsheet.xlsx",load_options)aswatermarker:watermark=gww.ImageWatermark("logo.gif")options=gwo_xls.SpreadsheetBackgroundWatermarkOptions()# Apply to the first worksheet (index 0) with default sizeoptions.worksheet_index=0options.background_width=800options.background_height=600watermarker.add(watermark,options)watermarker.save("spreadsheet.xlsx")