public final class SpreadsheetWatermarkShapeOptions extends SpreadsheetWatermarkBaseOptions
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();
| Constructor and Description |
|---|
SpreadsheetWatermarkShapeOptions()
Initializes a new instance of the
class. |
| Modifier and Type | Method and Description |
|---|---|
ISpreadsheetWatermarkEffects |
getEffects()
Gets a value of
or
for effects that should be applied to the watermark. |
int |
getWorksheetIndex()
Gets the index of worksheet to add the watermark to.
|
void |
setEffects(ISpreadsheetWatermarkEffects value)
Gets or sets a value of
or
for effects that should be applied to the watermark. |
void |
setWorksheetIndex(int value)
Sets the index of worksheet to add the watermark to.
|
getAlternativeText, getName, isLocked, setAlternativeText, setLocked, setNamepublic SpreadsheetWatermarkShapeOptions()
SpreadsheetWatermarkShapeOptions class.public final ISpreadsheetWatermarkEffects getEffects()
SpreadsheetImageEffects or SpreadsheetTextEffects
for effects that should be applied to the watermark.SpreadsheetImageEffects or SpreadsheetTextEffects for effects
that should be applied to the watermark.public final int getWorksheetIndex()
Gets the index of worksheet to add the watermark to.
public final void setEffects(ISpreadsheetWatermarkEffects value)
SpreadsheetImageEffects or
SpreadsheetTextEffects for effects that should be applied to the watermark.value - The SpreadsheetImageEffects or SpreadsheetTextEffects for effects
that should be applied to the watermark.public final void setWorksheetIndex(int value)
Sets the index of worksheet to add the watermark to.
value - The index of worksheet to add the watermark to.Copyright © 2026. All rights reserved.