Aspose.Cells provides a class, Workbook, that represents an Excel file. The Workbook class contains the Worksheets collection that allows access to each worksheet in the Excel file. A worksheet is represented by the Worksheet class.
The Worksheet class provides the PageSetup property used to set the page setup options for a worksheet. The PageSetup attribute is an object of the PageSetup class that enables developers to set different page layout options for a printed worksheet. The PageSetup class provides various properties and methods used to set page setup options.
Set page margins (left, right, top, bottom) using PageSetup class members. A few of the methods are listed below which are used to specify page margins: