NativeExcel for .Net Developer's Reference

IWorksheet.DisplayZeros Property

Gets or sets the value which specifies whether zero values are displayed for the specified worksheet

[Visual Basic]
PropertyDisplayZerosAsBoolean
[C#]
boolDisplayZeros{get;set;}
[C++]
__propertyboolget_DisplayZeros();
__propertyvoidset_DisplayZeros(bool);
[JScript]
functiongetDisplayZeros():bool
functionsetDisplayZeros(bool);

Property Value

True if zero values are displayed; otherwise, false. Default is true.

Example

This example sets the first sheet to hide zero values.

[C#]
book.Worksheets[1].DisplayZeros = false;
[VisualBasic]
book.Worksheets(1).DisplayZeros = False
[C++]
book->Worksheets->Item[1]->DisplayZeros = false;

See Also

IWorksheet Interface | NativeExcel Namespace