Aspose.Cells.GridWeb version 2.0.50728 - Watermark issue

Hi,

I’m using Aspose.Cells.GridWeb version 2.0.50728 and importing excel file by using (ImportExcelFile). In the UI screen watermark is not visible but excel file having watermark. We tried excel file with watermark text and watermark image both the cases not showing watermark. Kindly assist the solution for the issue.

@gopinathn,

Thanks for the details.

I guess the watermark shapes are not imported when importing Excel file to GridWeb. Anyways, we may look into it, so kindly provide your template file that you are importing into Aspose.Cells.GridWeb. We will evaluate your issue and may log appropriate ticket for the issue (if found).

PS. Did you try our latest version if it makes any difference.

Hi,

In the page load we are calling the below method to load the data. Please find the line of code and file which used to load. In the sample excel file having “confidential” message added while creating excel.
1.Code for adding watermark while creating excel.

Aspose.Cells.Drawing.Shape wordart = worksheet.Shapes.AddTextEffect(Aspose.Cells.Drawing.MsoPresetTextEffect.TextEffect1, “DRAFT”, “Arial Black”, 40, false, false, 18, 8, 1, 1, 130, 800);
//// Get the fill format of the word art
Aspose.Cells.Drawing.MsoFillFormat wordArtFormat = wordart.FillFormat;
////Set the color
wordArtFormat.ForeColor = System.Drawing.Color.Black;
//// Set the transparency
wordArtFormat.Transparency = 0.9;
//// Make the line invisible
Aspose.Cells.Drawing.MsoLineFormat lineFormat = wordart.LineFormat;
lineFormat.IsVisible = false;

2.Code for adding picture watermark while creating excel.
FileStream fs = File.OpenRead(@"…\Draft.png");
byte[] imageData = new byte[fs.Length];
fs.Read(imageData, 0, imageData.Length);
workbook.Worksheets[0].SetBackground(imageData);

3.Code for loading excel in Gridweb.

protected void LoadData()
{
string fileName;
if (!string.IsNullOrEmpty(path))
{
fileName = path;
GridWeb1.ImportExcelFile(fileName);
GridWeb1.ActiveSheetIndex = 0;

            if (!string.IsNullOrEmpty(Session["Height"].ToString()))
                GridWeb1.Height = Convert.ToInt32(Session["Height"], CultureInfo.CurrentCulture);
            else
                GridWeb1.Height = 400;
            if (Session["Locked"].ToString() == "FALSE")
            {
                WebWorksheets sheets = GridWeb1.WebWorksheets;
                int i = 0;
                for (; i < sheets.Count; i++)
                {
                    sheets[i].SetAllCellsReadonly();                    
                } 
            }
        }
    }
  1. Here with enclosed the sample template for reference.

Please assist. Not tried with latest version. Please share the version no of Aspose.Cells.GridWeb.
One more correction our current Aspose.Cells.GridWeb.dll assembly version 8.7.0.0.Sample.png (24.7 KB)

@gopinathn,

Thanks for the sample code segments, screenshot and details.

  1. Newer versions (e.g Aspose.Cells.GridWeb v18.8.x) support importing Excel files having word art shapes, so you may try it.

  2. I am afraid, currently, Aspose.Cells.GridWeb does not support rendering background image of the sheets when importing Excel files into Aspose.Cells.GridWeb. I have logged a ticket with an id “CELLSNET-46324” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

@gopinathn,

This is to inform you that we have fixed your issue (logged earlier as “CELLSNET-46324”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.