This project is read-only.

Set footer for sheet such as "This doc. has 5 pages. Current page is 3"

Sep 9, 2010 at 9:34 AM

NPOI is a great component to Export data to Excel!

Thanks you all


I have a small problem with set the footer text. The footer has the current page and total page number  info but  I dont know how to get these.

In Excel, it has some variable such as " &[Page] " but it's not work.

For example:

sheet1.Footer.Left = "This doc. has X pages. Current page is  Y"

How can I replace " X"  and  "Y" for the example  above?

Thanks for your help



Sep 10, 2010 at 10:54 AM

I found the answer!

Just set footer text as bellow:


sheet1.Footer.Left = "This doc. has &P pages. Current page is  &N"


Happy to all :)