We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Page Setup | Headers and Footers

Thread ID:





74619 Jun 23,2008 10:05 AM UTC Jun 25,2008 12:17 PM UTC ASP.NET Web Forms (Classic) 5
Tags: XlsIO
Jim Barry
Asked On June 23, 2008 10:05 AM UTC

Is there any way to manipulate the Page Setup of an Excel Sheet.

Specifically, I am looking to set the header/footer information and the following...


Yavanaarasi G [Syncfusion]
Replied On June 24, 2008 08:59 AM UTC

Hi JimB,

Thank you for your interest in Syncfusion products.

Yes. You can set the header/footer by using the below code snippet:

// Setting the Page number in the Center Header
sheet.PageSetup.CenterHeader = "&P";

// Setting the Time in the Left Header
sheet.PageSetup.LeftHeader = "&T";

// Setting the Date in the Right Header
sheet.PageSetup.RightHeader = "&D";

// Setting the file name in the Center Footer
sheet.PageSetup.CenterFooter = "&F";

// Setting the Shee Name in the Left Footer
sheet.PageSetup.LeftFooter = "&A";

// Setting the Location of the File in the Right Footer
sheet.PageSetup.RightFooter = "&Z";

Here is the KB article for how to set header and footer:

Please let me know if you have any other concerns.


Yavanaarasi G [Syncfusion]
Replied On June 24, 2008 09:30 AM UTC

Hi JimB,

Sorry for the broken link.

Please refer the below link:



Jim Barry
Replied On June 24, 2008 01:52 PM UTC

Using XP SP3, Office/Excel 2003.

If I setup a page footer, the footer displays "Page]" and not the page number as expected...

setup.CenterFooter = "&[Page]"

If I manually audit the "&[Page]" value, it seems to make a differences and starts working as expeced.

Jim Barry
Replied On June 24, 2008 07:48 PM UTC

OK, got it.

I need to use the special VB codes (&P) vs. the Excel syntax (&[Page])

Yavanaarasi G [Syncfusion]
Replied On June 25, 2008 12:17 PM UTC

Hi JimB,

Thank you for your update.

Please let me know if you have any other concerns.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon