Articles in this section
Category / Section

How can I set margins using XlsIO?

1 min read

The Margin option allows user to manipulate the size of the top, bottom, left and right margins and the size of the margins for the header and footer.

C#

//Page Setup Using Margins
sheet.PageSetup.LeftMargin = 2;
sheet.PageSetup.RightMargin = 2;
sheet.PageSetup.TopMargin = 2;
sheet.PageSetup.BottomMargin = 2;

VB

'Page Setup Using Margins
sheet.PageSetup.LeftMargin = 2
sheet.PageSetup.RightMargin = 2
sheet.PageSetup.TopMargin = 2
sheet.PageSetup.BottomMargin = 2

Here is the sample for your reference:

http://www.syncfusion.com/downloads/support/directtrac/general/SetMargins108081543.zip

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied