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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Excel Page Setup

Thread ID:

Created:

Updated:

Platform:

Replies:

57264 Feb 28,2007 03:29 PM UTC Mar 8,2007 12:12 PM UTC Windows Forms 4
loading
Tags: XlsIO
Administrator [Syncfusion]
Asked On February 28, 2007 03:29 PM UTC

Hi,
In excel, in the 'Page Setup' window, you can set up 'Rows to repeat at top' to e.g "$2:$2" to repear the header on each pages.

Please see my attached screen shot.

I try to
//repeat the header
sheet.PageSetup.PrintTitleRows="$2:$2";

"Value cannot be null.\r\nParameter name: input"

Any idea?

Lan




RepeatTopRow.zip

Administrator [Syncfusion]
Replied On February 28, 2007 06:25 PM UTC

Try to do the same operation in MS Excel and see what result will be returned by property that you were trying to set.

Melba Winshia [Syncfusion]
Replied On March 1, 2007 09:50 AM UTC

Hi Lan,

You can use PrintTitleRows and PrintTitleColumns properties of the PageSetup class to designate row and column headers that you want to have repeated on all pages of your printed worksheet. Please refer the following code snippet that illustrates the above:

[C#]

//Set Print Title Rows. Repeat row 2
sheet.PageSetup.PrintTitleRows = "$A$2:$IV$2";

//Print Columns 1 to 3
sheet.PageSetup.PrintTitleColumns = "$A$1:$C$65536";

Please refer the following sample which implements the above said feature:

PrintTitleRows.zip

Kindly take a look at the sample above and let me know if you have any other questions.

Regards,
Melba

Administrator [Syncfusion]
Replied On March 5, 2007 06:07 PM UTC

Hi Meliba,
Thanks for the sample. It is what I want.

Lan

Melba Winshia [Syncfusion]
Replied On March 8, 2007 12:12 PM UTC

Hi Lan,

Thanks for the update!

Kindly let me know if you have any other questions.

Regards,
Melba

CONFIRMATION

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.

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

;