orientation property

ExcelPageOrientation orientation
getter/setter pair

Represents the printing orientation of the worksheet.

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

Implementation

late ExcelPageOrientation orientation;