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.
- Load the document
- Create and initialize watermark object
- Set watermark properties
- Add watermark to the worksheet
- 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.