// For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
using (Document doc = Document.Load(Utilities.MapSourceFilePath (XlsFilePath)))
{
Font font = new Font("Calibri", 12);
TextWatermark watermark = new TextWatermark("Test watermark", font);
watermark.HorizontalAlignment = HorizontalAlignment.Right;
watermark.VerticalAlignment = VerticalAlignment.Bottom;
// Set relative margins. Margin value will be interpreted as a portion of appropriate parent dimension.
// If this type is chosen, margin value must be between 0.0 and 1.0.
watermark.Margins.MarginType = MarginType.RelativeToParentDimensions;
watermark.Margins.Right = 0.1;
watermark.Margins.Bottom = 0.2;
doc.AddWatermark(watermark);
doc.Save();
}