Add Watermark to Excel Worksheets using Java

Add Watermark to Excel Sheet Java

Watermarks are used to define the ownership of the copyrighted content and protect the Excel files from theft or being used illegally. In this article, you will learn how to add watermarks to Excel sheets programmatically. More precisely, the article will cover how to add watermark to Excel worksheets using Java.

Java API to Add Watermarks to Excel Worksheets

In order to add watermark to Excel files, we will use Aspose.Cells for Java. The API allows you to create, modify or convert Excel files from within the Java applications. You can either download the API’s JAR or install it using the following Maven configurations.

<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>https://repository.aspose.com/repo/</url>
</repository>
<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-cells</artifactId>
    <version>21.6</version>
</dependency>

Add Watermark to an Excel Worksheet in Java

The following are the steps to add a watermark in an Excel worksheet using Java.

The following code sample shows how to add a watermark to an Excel worksheet.

Output

The following is the screenshot of the Excel worksheet after adding the watermark.

Adding Watermark in Excel Worksheet

Get a Free License

You can use Aspose.Cells for Java without evaluation limitations using a temporary license.

Conclusion

In this article, you have learned how to add watermark to Excel worksheets using Java. The provided code sample can easily be integrated into the Java applications. You can also explore other features of Aspose.Cells for Java using the documentation. In case you would have any queries, you can post on our forum.

See Also