• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support

Set margin size

Set custom page margin sizes

Output: SetPageMargins.xlsx

public void Run()
{
    var workbook = new Workbook();
    var worksheet = workbook.Worksheets[0];

    worksheet.PageSetup.Margins.Left = 24;
    worksheet.PageSetup.Margins.Right = 24;
    worksheet.PageSetup.Margins.Top = 48;
    worksheet.PageSetup.Margins.Bottom = 48;

    workbook.SaveAs("SetPageMargins.xlsx");
}
  • Improve this Doc
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX