Skip to content

Commit ee5f8b3

Browse files
authored
Merge pull request #372 from syncfusion-content/FLUT-6849-HideSheet-HF
FLUT-6849 - UG documentation to hide Excel worksheet - Development
2 parents 85dd17c + 46d45a8 commit ee5f8b3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Flutter/xlsio/working-with-excel-worksheet.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,28 @@ File('Output.xlsx').writeAsBytes(bytes);
116116

117117
{% endhighlight %}
118118

119+
## Show or Hide Worksheet
120+
121+
The following code snippet shows how to hide the worksheet using **visibility** property.
122+
123+
{% highlight dart %}
124+
125+
//Create a new Excel Document.
126+
final Workbook workbook = Workbook(10);
127+
128+
//Accessing sheet via index.
129+
final Worksheet sheet = workbook.worksheets[2];
130+
sheet.getRangeByName('A1:M10').setText('Visibility');
131+
132+
//set the visibility for the worksheet.
133+
sheet.visibility = WorksheetVisibility.hidden;
134+
135+
final List<int> bytes = workbook.saveAsStream();
136+
File('Output.xlsx').writeAsBytes(bytes);
137+
workbook.dispose();
138+
139+
{% endhighlight %}
140+
119141
## Adjust Row Height and Column Width
120142

121143
**Resize a range of rows or columns**

0 commit comments

Comments
 (0)