---
title: "3 Easy Steps to Add Watermarks to Your Excel Document Using C#"
published_at: "2024-08-12T10:59:34+00:00"
modified_at: "2025-11-06T07:33:41+00:00"
url: "https://www.syncfusion.com/blogs/post/add-watermarks-to-excel-in-csharp"
excerpt: "Let’s see how to add watermarks to your Excel document using the Syncfusion .NET Excel library and C# with code examples."
taxonomy_category:
  - "C#"
  - "Document Processing"
  - "Excel"
  - "File Formats"
  - "Syncfusion"
  - "XlsIO"
taxonomy_post_tag:
  - ".NET"
  - "C#"
  - "csharp"
  - "Document Processing"
  - "Excel"
  - "Excel Library"
  - "File Formats"
---

# 3 Easy Steps to Add Watermarks to Your Excel Document Using C#

[Kurmitha Manickhaperumal](https://www.syncfusion.com/blogs/author/kurmitha-manickhaperumal)

![3 Easy Steps to Add Watermarks to Your Excel Document Using C#](https://www.syncfusion.com/blogs/wp-content/uploads/2024/08/596-x-334@2x-1.png)


**TL;DR:** Adding a watermark boosts branding, confidentiality, protection, and visual appeal. Use Syncfusion’s Excel Library in C# to easily add watermarks: set up a .NET Core Console app, install the NuGet package, and apply the code to insert and save. For full details, check the documentation and GitHub demo.

A watermark in Excel is a faint background image or text that appears behind the content of a worksheet. It is used for branding, confidentiality, or to indicate the status of a document, such as **Draft** or ** Confidential**. Watermarks do not interfere with the readability of the data and are often used to protect the document’s integrity.  

The Syncfusion [.NET Excel Library](https://www.syncfusion.com/document-sdk/net-excel-library)
, also known as Essential XlsIO, is a robust tool that facilitates the smooth creation, reading, and editing of Excel documents using C#. It supports the creation of Excel documents from scratch, modification of existing Excel documents, data import and export, Excel formulas, conditional formats, data validations, charts, sparklines, tables, pivot tables, pivot charts, template markers, and much more.

This blog will explore the steps to insert a watermark into an Excel document using the Syncfusion .NET Excel Library and C#.

**Note:** Before proceeding, refer to the [.NET Excel Library’s getting started documentation](https://help.syncfusion.com/document-processing/excel/excel-library/net/create-excel-file-csharp-vbnet)
.

## Steps to add a watermark to an Excel document using C#

Follow these steps to add watermarks to your Excel document using C# and .NET Excel Library:

1. First, create a [.NET Core Console app](https://learn.microsoft.com/en-us/dotnet/core/tutorials/with-visual-studio?pivots=dotnet-8-0) in [Visual Studio](https://visualstudio.microsoft.com/vs/) , as shown in the following image.[https://www.syncfusion.com/blogs/wp-content/uploads/2024/08/Create-a-.NET-Core-Console-app-in-Visual-Studio..png](https://www.syncfusion.com/blogs/wp-content/uploads/2024/08/Create-a-.NET-Core-Console-app-in-Visual-Studio..png)
2. Then, install the latest [Syncfusion.XlsIO.NET.Core](https://www.nuget.org/packages/Syncfusion.XlsIO.Net.Core/) NuGet package to your app.[https://www.syncfusion.com/blogs/wp-content/uploads/2024/08/Install-Syncfusion.XlsIO-NuGet-package.png](https://www.syncfusion.com/blogs/wp-content/uploads/2024/08/Install-Syncfusion.XlsIO-NuGet-package.png)
3. Adding a picture to the background as a watermark of the company’s logo or a relevant image will improve the document’s appearance. When you set a background picture to a worksheet, the picture is tiled so that it fills the whole screen repeatedly.The following code shows how to add a watermark to your Excel worksheet as a background image. The process will assume you already have the picture on your computer to use as a background image. [https://www.syncfusion.com/document-processing/excel-framework/net](https://www.syncfusion.com/document-processing/excel-framework/net) ``` using Syncfusion.XlsIO; using Syncfusion.Drawing; namespace WaterMark { class Program { public static void Main(string[] args) { using (ExcelEngine excelEngine = new ExcelEngine()) { IApplication application = excelEngine.Excel; application.DefaultVersion = ExcelVersion.Xlsx; // Load an existing Excel file. FileStream inputStream = new FileStream(@"../../../Data/InputTemplate.xlsx", FileMode.Open, FileAccess.Read); IWorkbook workbook = application.Workbooks.Open(inputStream); IWorksheet worksheet = workbook.Worksheets[0]; // Insert image in the worksheet for watermark. FileStream imageStream = new FileStream(@"../../../Data/Watermark.png", FileMode.Open, FileAccess.Read); worksheet.PageSetup.BackgoundImage = new Image(imageStream); // Save the workbook as stream. FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.Write); workbook.SaveAs(outputStream); //Dispose streams. inputStream.Dispose(); imageStream.Dispose(); outputStream.Dispose(); } } } } ``` Refer to the following images. [https://www.syncfusion.com/blogs/wp-content/uploads/2024/08/Input-Excel-document-1.png](https://www.syncfusion.com/blogs/wp-content/uploads/2024/08/Input-Excel-document-1.png) Input Excel document [https://www.syncfusion.com/blogs/wp-content/uploads/2024/08/Adding-a-watermark-to-an-Excel-document-using-Syncfusion-.NET-Excel-Library-and-C-1.png](https://www.syncfusion.com/blogs/wp-content/uploads/2024/08/Adding-a-watermark-to-an-Excel-document-using-Syncfusion-.NET-Excel-Library-and-C-1.png) Adding a watermark to an Excel document using Syncfusion .NET Excel Library and C#

## References

For more details, refer to the [adding a watermark to Excel using C# GitHub demo](https://github.com/SyncfusionExamples/XlsIO-Examples/tree/master/Use%20Cases/Watermark/NET%20Standard/Watermark)
 and [documentation](https://help.syncfusion.com/document-processing/excel/excel-library/net/migrate-from-office-automation-to-syncfusion-xlsio/set-background-for-excel-worksheet#xlsio)
.


## Conclusion

Thanks for reading! In this blog, we explored how to add a watermark to an Excel document using C# and Syncfusion [.NET Excel Library](https://www.syncfusion.com/document-sdk/net-excel-library)
 **(XlsIO)**. The Excel Library also allows you to export Excel data to [images](https://help.syncfusion.com/document-processing/excel/conversions/excel-to-image/overview)
, [data tables](https://help.syncfusion.com/document-processing/excel/excel-library/net/import-export/export-from-excel#excel-to-datatable)
, [CSV](https://help.syncfusion.com/document-processing/excel/conversions/excel-to-csv/overview)
, [TSV](https://help.syncfusion.com/document-processing/excel/conversions/excel-to-csv/overview#excel-to-tsv-conversion)
, [HTML](https://help.syncfusion.com/document-processing/excel/conversions/excel-to-html/overview)
, [collections of objects](https://help.syncfusion.com/document-processing/excel/excel-library/net/working-with-data)
, [ODS](https://help.syncfusion.com/document-processing/excel/conversions/excel-to-ods/overview)
, [JSON](https://help.syncfusion.com/document-processing/excel/conversions/excel-to-json/overview)
, and other file formats. Also, for more details, refer to our [.NET Excel library documentation](https://help.syncfusion.com/document-processing/excel/excel-library/net/create-excel-file-csharp-vbnet)
 and [demos](https://www.syncfusion.com/demos/fileformats/excel-library)
.

Feel free to try this versatile .NET Excel Library and share your feedback in the comments section!

For our existing customers, the new version of Essential Studio® is available on our [License and Downloads](https://www.syncfusion.com/account/login)
 page. If you are new to Syncfusion, you can try our 30-day [free trial](https://www.syncfusion.com/downloads)
 to check out our other controls.

You can also contact us through our [support forums](https://www.syncfusion.com/forums)
, [support portal](https://support.syncfusion.com/)
, or [feedback portal](https://www.syncfusion.com/feedback/)
. We are always happy to assist you!

## Related blogs

- [Create an Excel table in just 3 steps using C#](https://www.syncfusion.com/blogs/post/create-excel-table-in-3-steps-csharp)
- [Print Excel Documents in Just 4 Steps Using C#](https://www.syncfusion.com/blogs/post/print-excel-in-csharp.aspx)
- [Converting XLS to XLSX Format in Just 3 Steps Using C#](https://www.syncfusion.com/blogs/post/convert-xls-to-xlsx-csharp.aspx)
- [Easy Steps to Export HTML Tables to Excel in C#](https://www.syncfusion.com/blogs/post/easy-steps-to-export-html-tables-to-an-excel-worksheet-in-c.aspx)
