My application first creates a worksheet using Aspose.Cells verion 7.3.
The worksheet is protected with the following code:
Protection protection = workbook.Worksheets.Protection;<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
protection.AllowInsertingRow = true;
protection.AllowDeletingRow = true;
protection.AllowSelectingLockedCell = true;
This spreadsheet is correctly protected, the correct cells are locked and rows can be inserted.
However, the second step in the application is to make the generated spreadsheet available on a web page via Aspose.Cells.GridWeb version 188.8.131.52. The user can save the generated spreadsheet by clicking the save button.
<acw:GridWeb … onsavecommand="GridSaveCommand" …
protected void GridSaveCommand(object sender, EventArgs e)
MemoryStream memoryStream = new MemoryStream();
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("content-disposition", "attachment; filename=" + ConfigurationManager.AppSettings["DefaultFileSaveName"]);
Response.OutputStream.Write(memoryStream.GetBuffer(), 0, (int)memoryStream.Length);
The spreadsheet saved via Aspose.Cells.GridWeb is fully protected and does NOT ALLOW THE USER TO INSERT ANY ROWS. How did it lose its protection settings of AllowInsertingRow?