public static void CenterOnPage()
{
// ExStart:CenterOnPage
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
// Create a workbook object
Workbook workbook = new Workbook();
// Get the worksheets in the workbook
WorksheetCollection worksheets = workbook.Worksheets;
// Get the first (default) worksheet
Worksheet worksheet = worksheets[0];
// Get the pagesetup object
PageSetup pageSetup = worksheet.PageSetup;
// Specify Center on page Horizontally and Vertically
pageSetup.CenterHorizontally = true;
pageSetup.CenterVertically = true;
// Save the Workbook.
workbook.Save(dataDir + "CenterOnPage_out.xls");
// ExEnd:CenterOnPage
}
public static void HeaderAndFooterMargins()