Spire.XLS is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Tue Dec 20, 2022 2:13 pm

According to your program guide "How to add different header & footer for the first page", I was able to specify a different header and footer for the first page. However, this first page header is displayed only in the center. I want to set this to the right side of the page, how do I do that? Thanks in advance for your kindness.

Posts: 1
Joined: Tue Dec 20, 2022 2:01 pm

Wed Dec 21, 2022 8:11 am


Thanks for your inquiry.
You can add “&R” to the start of the header string to set the header to the right, for example,
Code: Select all
sheet.PageSetup.FirstHeaderString = "&R Different First page";

If you have any further questions, just feel free to contact us.

E-iceblue support team
User avatar

Posts: 365
Joined: Tue Nov 15, 2022 3:59 am

Return to Spire.XLS