Is it possible to add watermark to each sheet- like the demonstration in aspose word?

I only searched one demo "Adding WordArt Watermark to Chart", can it add text watermark to sheet, like the function in word or pdf. Thanks.

Hi,


Yes, you may do it, see the sample code for your reference:

Sample code:
// Add Watermark
Workbook workbook = new Workbook();
Worksheet sheet = workbook.Worksheets[0];

Aspose.Cells.Drawing.Shape wordart = sheet.Shapes.AddTextEffect(MsoPresetTextEffect.TextEffect1,
“CONFIDENTIAL”, “Arial Black”, 50, false, true
, 18, 8, 1, 1, 130, 800);

MsoFillFormat wordArtFormat = wordart.FillFormat;
wordArtFormat.ForeColor = System.Drawing.Color.Red;
wordArtFormat.Transparency = 0.9;
MsoLineFormat lineFormat = wordart.LineFormat;
lineFormat.IsVisible = false;

workbook.Save(“e:\test2\testWordArt.xls”);


Thank you.

It works, but can I get each worksheet height and width if one workbook has many sheet? because if I set a fixed value to AddTextEffect the last two parameters, and the worksheet has a shorter width or height, after print the sheet, it will generate a blank page, or is there any other solution for this issue?

and I found if it load a xlsx file and save to xlsx extension file, the watermark is missing, but if save it to xls extension, it's okay. I am not sure what's the reason, I am a newer to use cell component, thanks for your help.

Hi,

Please see if these properties are helpful in your case for finding sheet’s viable height and width.

  1. workbook.Worksheets.WindowHeightCM
  2. workbook.Worksheets.WindowHeightInch
  3. workbook.Worksheets.WindowLeftCM
  4. workbook.Worksheets.WindowLeftInch
  5. workbook.Worksheets.WindowTopCM
  6. workbook.Worksheets.WindowTopInch
  7. workbook.Worksheets.WindowWidthCM
  8. workbook.Worksheets.WindowWidthInch

Hi,


And for your issue regarding missing word art / watermark in XLSX files, we would like to inform you that this feature (“Support for Word Art effect feature for ShapeCollection for Xlsx file format.”) is not available at the moment. We have already logged a ticket for the feature with an id: CELLSNET-22897. Once we support or have any update, we will let you know here.

Thank you.

Thank you for your help.

Please ignore my last questinon .(blank page issue)