@@ -95,6 +95,7 @@ func ExampleFile_GetSheetViewOptions() {
9595 rightToLeft excelize.RightToLeft
9696 showFormulas excelize.ShowFormulas
9797 showGridLines excelize.ShowGridLines
98+ showZeros excelize.ShowZeros
9899 showRowColHeaders excelize.ShowRowColHeaders
99100 zoomScale excelize.ZoomScale
100101 topLeftCell excelize.TopLeftCell
@@ -105,6 +106,7 @@ func ExampleFile_GetSheetViewOptions() {
105106 & rightToLeft ,
106107 & showFormulas ,
107108 & showGridLines ,
109+ & showZeros ,
108110 & showRowColHeaders ,
109111 & zoomScale ,
110112 & topLeftCell ,
@@ -117,6 +119,7 @@ func ExampleFile_GetSheetViewOptions() {
117119 fmt .Println ("- rightToLeft:" , rightToLeft )
118120 fmt .Println ("- showFormulas:" , showFormulas )
119121 fmt .Println ("- showGridLines:" , showGridLines )
122+ fmt .Println ("- showZeros:" , showZeros )
120123 fmt .Println ("- showRowColHeaders:" , showRowColHeaders )
121124 fmt .Println ("- zoomScale:" , zoomScale )
122125 fmt .Println ("- topLeftCell:" , `"` + topLeftCell + `"` )
@@ -137,8 +140,17 @@ func ExampleFile_GetSheetViewOptions() {
137140 panic (err )
138141 }
139142
143+ if err := f .SetSheetViewOptions (sheet , 0 , excelize .ShowZeros (false )); err != nil {
144+ panic (err )
145+ }
146+
147+ if err := f .GetSheetViewOptions (sheet , 0 , & showZeros ); err != nil {
148+ panic (err )
149+ }
150+
140151 fmt .Println ("After change:" )
141152 fmt .Println ("- showGridLines:" , showGridLines )
153+ fmt .Println ("- showZeros:" , showZeros )
142154 fmt .Println ("- topLeftCell:" , topLeftCell )
143155
144156 // Output:
@@ -147,11 +159,13 @@ func ExampleFile_GetSheetViewOptions() {
147159 // - rightToLeft: false
148160 // - showFormulas: false
149161 // - showGridLines: true
162+ // - showZeros: true
150163 // - showRowColHeaders: true
151164 // - zoomScale: 0
152165 // - topLeftCell: ""
153166 // After change:
154167 // - showGridLines: false
168+ // - showZeros: false
155169 // - topLeftCell: B2
156170}
157171
0 commit comments