SpreadsheetWatermarkHeaderFooterOptions

SpreadsheetWatermarkHeaderFooterOptions class

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

public sealed class SpreadsheetWatermarkHeaderFooterOptions : WatermarkOptions

Constructors

Name Description
SpreadsheetWatermarkHeaderFooterOptions() Initializes a new instance of the SpreadsheetWatermarkHeaderFooterOptions class.

Properties

Name Description
WorksheetIndex { get; set; } Gets or sets the index of worksheet to add the watermark to.

Remarks

Learn more:

Examples

Add text watermark into Excel worksheet header.

SpreadsheetLoadOptions loadOptions = new SpreadsheetLoadOptions();
using (Watermarker watermarker = new Watermarker(@"D:\test.xls", loadOptions))
{
    TextWatermark watermark = new TextWatermark("Test", new Font("Arial", 14));

    SpreadsheetWatermarkHeaderFooterOptions options = new SpreadsheetWatermarkHeaderFooterOptions();
    options.WorksheetIndex = 0;

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

See Also