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.

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.

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

Wed Dec 21, 2022 8:11 am

Hi,

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.

Sincerely,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Return to Spire.XLS