SpreadsheetWatermarkShapeOptions
Leave feedback
On this page
Represents options when adding shape watermark to a Spreadsheet worksheet.
public sealed class SpreadsheetWatermarkShapeOptions : SpreadsheetWatermarkBaseOptions
| Name | Description |
|---|---|
| SpreadsheetWatermarkShapeOptions() | Initializes a new instance of the SpreadsheetWatermarkShapeOptions class. |
| Name | Description |
|---|---|
| AlternativeText { get; set; } | Gets or sets the descriptive (alternative) text that will be associated with a shape. |
| Effects { get; set; } | Gets or sets a value of SpreadsheetImageEffects or SpreadsheetTextEffects for effects that should be applied to the watermark. |
| IsLocked { get; set; } | Gets or sets a value indicating whether an editing of the shape in Excel is forbidden. |
| Name { get; set; } | Gets or sets the name a shape. |
| WorksheetIndex { get; set; } | Gets or sets the index of worksheet to add the watermark to. |
Learn more:
Add watermark to a particular worksheet of an Excel document.
SpreadsheetLoadOptions loadOptions = new SpreadsheetLoadOptions();
using (Watermarker watermarker = new Watermarker(@"C:\Documents\test.xls", loadOptions))
{
TextWatermark watermark = new TextWatermark("Test watermark", new Font("Arial", 36, FontStyle.Bold | FontStyle.Italic));
watermark.HorizontalAlignment = HorizontalAlignment.Center;
watermark.VerticalAlignment = VerticalAlignment.Center;
SpreadsheetWatermarkShapeOptions options = new SpreadsheetWatermarkShapeOptions();
options.WorksheetIndex = 0;
watermarker.Add(watermark, options);
watermarker.Save();
}
- class SpreadsheetWatermarkBaseOptions
- namespace GroupDocs.Watermark.Options.Spreadsheet
- assembly GroupDocs.Watermark
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.