Skip to content

Commit 42d8285

Browse files
FLUT-6940-PageSetupXlsIO-Dev
1 parent b37816c commit 42d8285

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

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

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ final Workbook workbook = Workbook();
128128
final Worksheet sheet = workbook.worksheets[0];
129129

130130
//Set text
131-
sheet.getRangeByName('A1:D4').text = 'Hello';
131+
sheet.getRangeByName('A1:Z100').text = 'Hello';
132132

133133
//Center Horizontally and center Vertically
134134
sheet.pageSetup.isCenterHorizontally = true;
@@ -145,6 +145,27 @@ sheet.pageSetup.bottomMargin = 1;
145145
sheet.pageSetup.footerMargin = 4;
146146
sheet.pageSetup.headerMargin = 3.5;
147147

148+
//Paper size
149+
sheet.pageSetup.paperSize = ExcelPaperSize.a2Paper;
150+
151+
//Print area
152+
sheet.pageSetup.printArea = 'A1:D20';
153+
154+
//Gridlines
155+
sheet.pageSetup.showGridlines = true;
156+
157+
//Black and white
158+
sheet.pageSetup.isBlackAndWhite = true;
159+
160+
//Draft
161+
sheet.pageSetup.isDraft = true;
162+
163+
//Row and column headings
164+
sheet.pageSetup.showHeadings = true;
165+
166+
//Page order
167+
sheet.pageSetup.order = ExcelPageOrder.overThenDown;
168+
148169
//Save and dispose workbook.
149170
final List<int> bytes = workbook.saveAsStream();
150171
workbook.dispose();

0 commit comments

Comments
 (0)