SpreadsheetWatermarkShapeOptions
Inheritance: java.lang.Object, com.groupdocs.watermark.options.WatermarkOptions, com.groupdocs.watermark.options.SpreadsheetWatermarkOptions, com.groupdocs.watermark.options.SpreadsheetWatermarkBaseOptions
public final class SpreadsheetWatermarkShapeOptions extends SpreadsheetWatermarkBaseOptions
Represents options when adding shape watermark to a Spreadsheet worksheet.
Learn more:
The following example demonstrates how to add a watermark to a particular worksheet of an Excel document.
SpreadsheetLoadOptions loadOptions = new SpreadsheetLoadOptions(); Watermarker watermarker = new Watermarker(“D:\test.xls”, loadOptions);
TextWatermark watermark = new TextWatermark(“Test”, new Font(“Arial”, 14));
SpreadsheetWatermarkShapeOptions options = new SpreadsheetWatermarkShapeOptions(); options.setWorksheetIndex(0);
watermarker.save(“D:\watermarked_test.xlsx”); watermarker.close();
Constructors
Constructor | Description |
---|---|
SpreadsheetWatermarkShapeOptions() | Initializes a new instance of the [SpreadsheetWatermarkShapeOptions](../../com.groupdocs.watermark.options/spreadsheetwatermarkshapeoptions) class. |
Methods
Method | Description |
---|---|
getWorksheetIndex() | Gets the index of worksheet to add the watermark to. |
setWorksheetIndex(int value) | Sets the index of worksheet to add the watermark to. |
getEffects() | Gets a value of [SpreadsheetImageEffects](../../com.groupdocs.watermark.options/spreadsheetimageeffects) or [SpreadsheetTextEffects](../../com.groupdocs.watermark.options/spreadsheettexteffects) for effects that should be applied to the watermark. |
setEffects(ISpreadsheetWatermarkEffects value) | Gets or sets a value of [SpreadsheetImageEffects](../../com.groupdocs.watermark.options/spreadsheetimageeffects) or [SpreadsheetTextEffects](../../com.groupdocs.watermark.options/spreadsheettexteffects) for effects that should be applied to the watermark. |
SpreadsheetWatermarkShapeOptions()
public SpreadsheetWatermarkShapeOptions()
Initializes a new instance of the [SpreadsheetWatermarkShapeOptions](../../com.groupdocs.watermark.options/spreadsheetwatermarkshapeoptions)
class.
getWorksheetIndex()
public final int getWorksheetIndex()
Gets the index of worksheet to add the watermark to.
Returns: int - The index of worksheet to add the watermark to.
-1 means every worksheet.
setWorksheetIndex(int value)
public final void setWorksheetIndex(int value)
Sets the index of worksheet to add the watermark to.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The index of worksheet to add the watermark to. |
-1 means every worksheet. |
getEffects()
public final ISpreadsheetWatermarkEffects getEffects()
Gets a value of [SpreadsheetImageEffects](../../com.groupdocs.watermark.options/spreadsheetimageeffects)
or [SpreadsheetTextEffects](../../com.groupdocs.watermark.options/spreadsheettexteffects)
for effects that should be applied to the watermark.
Returns:
ISpreadsheetWatermarkEffects - The [SpreadsheetImageEffects](../../com.groupdocs.watermark.options/spreadsheetimageeffects)
or [SpreadsheetTextEffects](../../com.groupdocs.watermark.options/spreadsheettexteffects)
for effects that should be applied to the watermark.
setEffects(ISpreadsheetWatermarkEffects value)
public final void setEffects(ISpreadsheetWatermarkEffects value)
Gets or sets a value of [SpreadsheetImageEffects](../../com.groupdocs.watermark.options/spreadsheetimageeffects)
or [SpreadsheetTextEffects](../../com.groupdocs.watermark.options/spreadsheettexteffects)
for effects that should be applied to the watermark.
Parameters:
Parameter | Type | Description |
---|---|---|
value | ISpreadsheetWatermarkEffects | The [SpreadsheetImageEffects](../../com.groupdocs.watermark.options/spreadsheetimageeffects) or [SpreadsheetTextEffects](../../com.groupdocs.watermark.options/spreadsheettexteffects) for effects that should be applied to the watermark. |