PageSetup.HeaderMargin
PageSetup.HeaderMargin property
Represents the distance from the top of the page to the header, in unit of centimeters.
public double HeaderMargin { get; set; }
Examples
using System;
using Aspose.Cells;
namespace AsposeCellsExamples
{
public class PageSetupPropertyHeaderMarginDemo
{
public static void Run()
{
// Create a new workbook
Workbook workbook = new Workbook();
// Access the first worksheet
Worksheet worksheet = workbook.Worksheets[0];
// Access PageSetup
PageSetup pageSetup = worksheet.PageSetup;
// Set header margin in centimeters
pageSetup.HeaderMargin = 1.5;
// Verify the header margin was set
Console.WriteLine("Header Margin: " + pageSetup.HeaderMargin + " cm");
// Save the workbook
workbook.Save("HeaderMarginDemo.xlsx");
}
}
}
See Also
- class PageSetup
- namespace Aspose.Cells
- assembly Aspose.Cells