File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ final Workbook workbook = Workbook();
128
128
final Worksheet sheet = workbook.worksheets[ 0] ;
129
129
130
130
//Set text
131
- sheet.getRangeByName('A1: D4 ').text = 'Hello';
131
+ sheet.getRangeByName('A1: Z100 ').text = 'Hello';
132
132
133
133
//Center Horizontally and center Vertically
134
134
sheet.pageSetup.isCenterHorizontally = true;
@@ -145,6 +145,27 @@ sheet.pageSetup.bottomMargin = 1;
145
145
sheet.pageSetup.footerMargin = 4;
146
146
sheet.pageSetup.headerMargin = 3.5;
147
147
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
+
148
169
//Save and dispose workbook.
149
170
final List<int > bytes = workbook.saveAsStream();
150
171
workbook.dispose();
You can’t perform that action at this time.
0 commit comments