SpreadsheetBackgroundWatermarkOptions Class
Represents options when adding the watermark as a background to a Spreadsheet worksheet.
Inheritance Hierarchy

Namespace: GroupDocs.Watermark.Options.Spreadsheet
Assembly: GroupDocs.Watermark (in GroupDocs.Watermark.dll) Version: 20.7.0
Syntax
public sealed class SpreadsheetBackgroundWatermarkOptions : SpreadsheetWatermarkOptions

The SpreadsheetBackgroundWatermarkOptions type exposes the following members.

Constructors
  NameDescription
Public methodSpreadsheetBackgroundWatermarkOptions
Initializes a new instance of the SpreadsheetBackgroundWatermarkOptions class.
Properties
  NameDescription
Public propertyBackgroundHeight
Gets or sets the desired height of the background image in pixels.
Public propertyBackgroundWidth
Get or sets the desired width of the background image in pixels.
Public propertyWorksheetIndex
Get or sets the index of worksheet to add the watermark to.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodToString (Inherited from Object.)
Remarks
Examples
Add text watermark to an Excel document worksheet as background.
C#
SpreadsheetLoadOptions loadOptions = new SpreadsheetLoadOptions();
using (Watermarker watermarker = new Watermarker(@"C:\Documents\test.xlsx", loadOptions))
{
    TextWatermark watermark = new TextWatermark("Test watermark", new Font("Arial", 36));

    SpreadsheetBackgroundWatermarkOptions options = new SpreadsheetBackgroundWatermarkOptions();
    options.WorksheetIndex = -1; // default
    options.BackgroundWidth = 800;
    options.BackgroundHeight = 600;

    watermarker.Add(watermark, options);
    watermarker.Save();
}
See Also