Hidden cells

HI,

In Excel you can select a cell and open the format cells dialog, under protection tab you can select the cell be hidden.

How do you do this in aspose cell please?

@bonson

Thanks for using Aspose APIs.

Please use the Style.IsFormulaHidden property for your needs. Please see the following sample code, its output Excel file and screenshot for a reference.

Download Link:
Output Excel File.zip (5.6 KB)

C#

Workbook wb = new Workbook();

Worksheet ws = wb.Worksheets[0];

Cell cell = ws.Cells["B4"];
cell.PutValue("Hidden");

Style s = cell.GetStyle();
s.IsFormulaHidden = true;
cell.SetStyle(s);

wb.Save("output.xlsx");

Screenshot:

Great - thanks