Skip to end of metadata
Go to start of metadata
Contents Summary

The code samples in this article use some of the methods defined in Working with Common Utilities.

Adding Watermark to a Particular Worksheet 

GroupDocs.Watermark provides an easy way to add watermark to the worksheets of an Excel document. Adding watermark to a particular Excel worksheet using GroupDocs.Watermark consists of following steps.

  1. Load the document
  2. Create and initialize watermark object
  3. Set watermark properties
  4. Add watermark to the worksheet
  5. Save the document

Following code sample shows how to add watermark to a particular worksheet.

Adding Locked Watermark

GroupDocs.Watermark also allows locking the added watermark to forbid the user from editing. The setLocked method of CellsShapeSettings class is used for this purpose. The following code sample shows how to lock a watermark.

 

Getting Size of Content Area

If for some reasons you want to use absolute sizing and positioning, you may also need to get the size of the content area (range of cells which contains data). GroupDocs.Watermark allows you to get the dimensions of Excel worksheet as shown in the following code sample.

Adding Watermark to the Images from a Particular Worksheet

Using GroupDocs.Watermark, you can add watermark to the images that belong to a particular worksheet. Following code sample shows how to add watermark to the images inside a worksheet.

 

GroupDocs.Watermark also allows you to lock the added watermark for editing. The setLock method of SlidesShapeSettings class is used for this purpose. The following code sample shows how to lock a watermark.

 
Labels
  • No labels