Hi,
How to apply filter to protected sheet in Excel file using C#.NET via Aspose.Cells APIs? I am trying apply filter functionality to protected Excel sheet but it is not showing data in filter.
When I click on filter it display as Showing All.
Platform: .NET
------------------------------------Dummy Code---------------------------------
this.worksheet.Cells[0, 0].PutValue("Product ID");
this.worksheet.Cells[0, 1].PutValue("Product Name");
this.worksheet.Cells[1, 0].PutValue(1);
this.worksheet.Cells[2, 0].PutValue(2);
this.worksheet.Cells[3, 0].PutValue(3);
this.worksheet.Cells[4, 0].PutValue(4);
this.worksheet.Cells[1, 1].PutValue("Apples");
this.worksheet.Cells[2, 1].PutValue("Bananas");
this.worksheet.Cells[3, 1].PutValue("Grapes");
this.worksheet.Cells[4, 1].PutValue("Oranges");
this.worksheet.AutoFilter.Range = "A1:B1";
this.worksheet.AutoFilter.Refresh();
workbook.Worksheets[0].Protect(ProtectionType.All, "test", null);
Current Ouput : -
output.zip (6.7 KB)
Current_Output.png (3.2 KB)
Expected Output as below:-
Expected_Output.png (8.3 KB)
Happy Coding
Thanks