Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Wed Aug 15, 2018 7:56 pm

Hi,

In Excel 2016 there is a feature on the header/footer section to Allign the header/foother with the page margins. This is default active (checked) if you create a new excel. However when i create a xls with Spire, then it is not active.

My question: How can i activate the "Align with parge margins" option"?

Kind regards,
Perry

p.meertens
 
Posts: 8
Joined: Tue Sep 23, 2014 8:41 pm

Thu Aug 16, 2018 8:08 am

Dear Perry,

Thanks for your inquiry.
I did notice the behavior while testing your case with our free version, sorry that we have no plan to maintain free version at present. I have confirmd the issue doesn't exist in our commercial version (Spire.XLS Pack(Hotfix) Version:8.8.1), please upgrade to the commercial one to have a try. And to help you better evaluate our commercial version, we could offer 1-month free license to you. If interested, please contact our sales team (sales@e-iceblue.com) to get it.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1187
Joined: Tue Sep 27, 2016 1:06 am

Tue Aug 21, 2018 2:27 am

Dear Perry,

Greetings from E-iceblue.
Has your issue been resolved?
Thanks in advance for your valuable feedback and time.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1187
Joined: Tue Sep 27, 2016 1:06 am

Wed Aug 29, 2018 6:55 am

Hi Nina,

Thanx for your reply. However you did not answere my question completely: How can i activate the "Align with page margins" option"? I now have a new version but still don't know what code to use to activate or deactivate this option.

Hope to hear from you.
Perry

p.meertens
 
Posts: 8
Joined: Tue Sep 23, 2014 8:41 pm

Wed Aug 29, 2018 7:29 am

Dear Perry,

Thanks for your feedback.
Please use below code to deactivate the option.
Code: Select all
Worksheet sheet = wb.Worksheets[0];
//Deactivate the "Align With Page Margins" option. Please note its default value is 1.
sheet.PageSetup.AlignWithMargins = 0;

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1187
Joined: Tue Sep 27, 2016 1:06 am

Fri Aug 31, 2018 10:38 am

Hi,

Greetings from E-iceblue.
Has your issue been fixed?
Thanks in advance for your valuable feedback and time.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1187
Joined: Tue Sep 27, 2016 1:06 am

Return to Spire.XLS