com.groupdocs.watermark.options

Interfaces

Classes

com.groupdocs.watermark.options

Class SpreadsheetWatermarkHeaderFooterOptions



  • public final class SpreadsheetWatermarkHeaderFooterOptions
    extends SpreadsheetWatermarkOptions
    Represents options when adding the watermark to a Spreadsheet header/footer.

    Learn more:

    The following example demonstrates how to add a text watermark into Excel worksheet header.

    SpreadsheetLoadOptions loadOptions = new SpreadsheetLoadOptions();
       Watermarker watermarker = new Watermarker("D:\\test.xls", loadOptions);
    
       TextWatermark watermark = new TextWatermark("Test", new Font("Arial", 14));
    
       SpreadsheetWatermarkHeaderFooterOptions options = new SpreadsheetWatermarkHeaderFooterOptions();
       options.setWorksheetIndex(0);
       
       watermarker.save("D:\\watermarked_test.xlsx");
       watermarker.close();
     
    • Method Detail

      • getWorksheetIndex

        public final int getWorksheetIndex()

        Gets the index of worksheet to add the watermark to.

        Returns:
        The index of worksheet to add the watermark to.


        -1 means every worksheet.
      • setWorksheetIndex

        public final void setWorksheetIndex(int value)

        Sets the index of worksheet to add the watermark to.

        Parameters:
        value - The index of worksheet to add the watermark to.


        -1 means every worksheet.