printArea property

String printArea
getter/setter pair

Represents the range to be printed

final Workbook workbook = Workbook();
final Worksheet sheet = workbook.worksheets[0];
sheet.getRangeByName('A1:M20').text = 'Hello';
sheet.pageSetup.printArea = 'A1:E20';
final List<int> bytes = workbook.saveAsStream();
saveAsExcel(bytes, 'printArea.xlsx');
workbook.dispose();

Implementation

late String printArea;