From 0c6afe0e6e1ea7cde0ca3f825c4214f035ce4d52 Mon Sep 17 00:00:00 2001 From: Konduru Keerthi Konduru Ravichandra Raju Date: Thu, 8 Dec 2022 13:07:41 +0530 Subject: [PATCH 1/3] FLUT-6942-FreezePanesXlsIO-Dev --- Flutter/xlsio/working-with-excel-worksheet.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/Flutter/xlsio/working-with-excel-worksheet.md b/Flutter/xlsio/working-with-excel-worksheet.md index 67b404783..a28b96b8d 100644 --- a/Flutter/xlsio/working-with-excel-worksheet.md +++ b/Flutter/xlsio/working-with-excel-worksheet.md @@ -218,6 +218,55 @@ File('Output.xlsx').writeAsBytes(bytes); workbook.dispose(); {% endhighlight %} +## Freeze Panes + +It is possible to freeze a portion of the sheet to keep it visible while you scroll through the rest of the sheet. The following code snippet shows how to freeze panes. + +{% highlight dart %} +//Create a new Excel Document. +final Workbook workbook = Workbook(1); + +//Access worksheet +final Worksheet worksheet = workbook.worksheets[0]; + +//Set text +worksheet.getRangeByName('A1:H10').text = 'FreezePanes'; + +//Freeze Panes +worksheet.getRangeByName('A2').freezePanes(); + +//save and dispose. +final List bytes = workbook.saveAsStream(); +File('Output.xlsx').writeAsBytes(bytes); +workbook.dispose(); +{% endhighlight %} + +## Unfreeze Panes + +The following code snippet explains how to unfreeze the panes. + +{% highlight dart %} +//Create a new Excel Document. +final Workbook workbook = Workbook(1); + +//Access worksheet +final Worksheet worksheet = workbook.worksheets[0]; + +//Set text +worksheet.getRangeByName('A1:H10').text = 'FreezePanes'; + +//Freeze Panes +worksheet.getRangeByName('A2').freezePanes(); + +//Unfreeze the existing freeze panes +worksheet.unfreezePanes(); + +//save and dispose. +final List bytes = workbook.saveAsStream(); +File('Output.xlsx').writeAsBytes(bytes); +workbook.dispose(); +{% endhighlight %} + ## Right to Left Direction A *worksheet* direction can be changed from right to left programmatically through **isRightToLeft** property of **Worksheet**. The following code snippet explains this. From e2b73509187075c0e5db09d09c8719f9fbeea5ea Mon Sep 17 00:00:00 2001 From: Konduru Keerthi Konduru Ravichandra Raju Date: Fri, 9 Dec 2022 14:07:30 +0530 Subject: [PATCH 2/3] FLUT-6942-FreezePanesXlsIO-Dev --- Flutter/xlsio/working-with-excel-worksheet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flutter/xlsio/working-with-excel-worksheet.md b/Flutter/xlsio/working-with-excel-worksheet.md index a28b96b8d..776ad6770 100644 --- a/Flutter/xlsio/working-with-excel-worksheet.md +++ b/Flutter/xlsio/working-with-excel-worksheet.md @@ -220,7 +220,7 @@ workbook.dispose(); ## Freeze Panes -It is possible to freeze a portion of the sheet to keep it visible while you scroll through the rest of the sheet. The following code snippet shows how to freeze panes. +A portion of the worksheet can be frozen to keep it visible while you scroll through the rest of the sheet. The following code snippet shows how to freeze panes. {% highlight dart %} //Create a new Excel Document. From a52c9d6f4f552204b6d72cb59b97ad9fd4d83d30 Mon Sep 17 00:00:00 2001 From: MOHAN CHANDRAN <93247949+Mohan2401@users.noreply.github.com> Date: Tue, 13 Dec 2022 18:56:06 +0530 Subject: [PATCH 3/3] Update working-with-excel-worksheet.md --- Flutter/xlsio/working-with-excel-worksheet.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flutter/xlsio/working-with-excel-worksheet.md b/Flutter/xlsio/working-with-excel-worksheet.md index 776ad6770..d7e7e2989 100644 --- a/Flutter/xlsio/working-with-excel-worksheet.md +++ b/Flutter/xlsio/working-with-excel-worksheet.md @@ -220,7 +220,7 @@ workbook.dispose(); ## Freeze Panes -A portion of the worksheet can be frozen to keep it visible while you scroll through the rest of the sheet. The following code snippet shows how to freeze panes. +A portion of the worksheet can be frozen to keep it visible while scrolling through the rest of the sheet. The following code snippet shows how to create freeze panes. {% highlight dart %} //Create a new Excel Document. @@ -243,7 +243,7 @@ workbook.dispose(); ## Unfreeze Panes -The following code snippet explains how to unfreeze the panes. +The following code snippet explains how to remove freeze panes. {% highlight dart %} //Create a new Excel Document.