Skip to end of metadata
Go to start of metadata

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

In the previous section, we described three kinds of watermark that can be added to an Excel document using GroupDocs.Watermark API. Here we will focus on how to work with shapes.

Working with Shapes

Extracting Information about all Shapes in an Excel Document

FindWatermarks method searches watermarks of all mentioned types, but in some cases, it's necessary to analyze only one class of Excel objects. Following code sample shows how to get information about all the shapes in an Excel document.

 

Removing a Particular Shape

You can also remove a particular shape from the worksheet as shown in the below code sample.

 

Adding Watermark to all Image Shapes in an Excel Worksheet

Using GroupDocs.Watermark, you can add watermark to the image shapes that belong to an Excel worksheet as shown in the below code sample.

 

Removing Shapes with Particular Text Formatting

You can also find and remove the shapes with a particular text formatting from an Excel document as shown in the below code sample.

 

Removing/Replacing Hyperlink Associated with a Particular Shape

Using GroupDocs.Watermark for .NET, you can also remove/replace hyperlink associated with a particular shape or chart inside an Excel document. Use following code sample to achieve this functionality.

 

This feature is also supported for charts.

Replacing Text for Particular Shapes

Since version 17.12, GroupDocs.Watermark supports replacing text for particular shapes in an Excel Worksheet. Following code sample shows the usage of this feature. 

 

You can also replace the text of the shapes with formatted text as shown in the following code sample.

Replacing Shape Image

GroupDocs.Watermark also allows you to replace the image of the particular shapes in an Excel Worksheet as shown in the following code sample. This feature is supported since version 17.12. 

Setting Background Image for Particular Shapes

Since version 17.12, GroupDocs.Watermark enables you to set the background image for the particular shapes in an Excel Worksheet. Following code sample shows the usage of this feature.

Updating Shape Properties

Since version 17.12, GroupDocs.Watermark also provides the feature of modifying properties of particular shapes in an Excel Worksheet. Following code sample shows how to use this feature.


Labels
  • No labels