paperSize property
Represents the paper size for the worksheet.
final Workbook workbook = Workbook();
final Worksheet sheet = workbook.worksheets[0];
sheet.getRangeByName('A1:M40').text = 'Hello';
sheet.pageSetup.paperSize = ExcelPaperSize.a2Paper;
final List<int> bytes = workbook.saveAsStream();
saveAsExcel(bytes, 'paperSize.xlsx');
workbook.dispose();
Implementation
late ExcelPaperSize paperSize;