Welcome to MSDN Blogs Sign in | Join | Help

Microsoft Excel

The team blog for Microsoft Excel and Excel Services.
Headers and Footers in Excel 2007

In the post last week on Page Layout view, some of you may have noticed the words “Click to add header” in a few of the screenshots, which was a hint that there have been some changes in headers and footers in Excel 2007.  I am going to review those changes, as well as a few other minor printing tweaks, in this post.

When we added Page Layout view to Excel, we wanted to make it easier for users to see their work within the context of a printed page, thereby simplifying the process of getting work ready to be printed.  An important part of that process is adding headers and footers.  Accordingly, we added the ability for users to simply click on their headers and type what they wanted to see, without having to navigate the “Customer Headers and Footers” dialog that exists in current versions of Excel.  Let’s take a look at how this works.

Here is a sample document (in this case my to-do list prettied up a bit, but you get the idea) in page layout view.  The basic formatting is done, and now I just want to add a header and footer.


(Click to enlarge)

As I move my mouse over the “Click to add header” region of the page, I get some feedback that allows me to start adding content. 


(Click to enlarge)

First, Excel shows me that there are three regions where I can add content (left, centre, right, as in current versions of Excel).  Second, the region under my mouse turns grey, which gives me some further feedback that something might happen if I click my mouse button.  All I need to do to add a customer header is click and type.


(Click to enlarge)

At this point, it is as easy as typing and formatting.  Also, you may have noticed that a contextual tab – Headers and Footers Tools – appeared, which contains all the tools (other than text formatting) that I can use when working with Headers and Footers in Excel.  For example, you can pick from galleries of pre-defined headers and footers, navigate between headers and footers, and insert things like the date or page numbers.


(Click to enlarge)

As you may have noticed from looking at the Headers and Footers Tools tab, we have added some new functionality to headers and footers as well, so I want to review that quickly.  In no particular order,

  • Colored text in headers and footers – headers and footers now support colored text formatting
  • Different first page – this setting allows users to specify a unique header and footer for the first page … this is useful for reports with title pages or tables of contents where the header or footer might need to be different
  • Different odd and even pages – similar to the “first page” setting, this setting allows users to specify unique headers and footers for odd and even pages … this is useful when creating book-style reports
  • Align with page margins – users can now choose to align their header and footer margins to the page margin
  • Scale with the document – this setting allows headers and footers to ignore the page scaling set for a given sheet …this is useful for multi-sheet reports that have different scaling percentages for pages but where the user would like consistent headers and footers

Finally, everything I just covered is true for footers too, so they are also as easy as clicking and typing.


(Click to enlarge)

A few other printing improvements

There are a couple of other small changes I want to point out, because they come up in conversations with customers.  First, Excel 2007 will no longer will create multiple print jobs when printing multiple copies of a document when printer collating is turned on.  You knew you hit this problem when you printed 20 copies of a document and found 20 banner pages, 1 between each copy of the Excel work you printed.  Second, we have added an “Ignore Print Areas” checkbox on the Print dialog, which allows users to print their entire sheet without having to remove their print areas first.


(Click to enlarge)

That’s it for today.  Tomorrow, I will start on charting.

 

Posted: Monday, April 10, 2006 11:14 AM by David Gainer

Comments

tjtjjtjt said:

Will you be able to specify a starting number other than 1?
Will you be able to use Roman numerals or alphnumeric numbering?
And, finally, will there be any easy way to divide a document into sections similar to the manner in which this is done in a Word document?

What I would like to see in Office (at least for headers and footers):
A utility that reads Section Breaks placed in any Office document that will allow me to designate print order and numbering across multiple documents.  For example, I may have title page, introductory material and executive summary in a Word document in Section 1.  Then, I'll have the first part of the document in Section 2.
For Section 3, I would like data (and possibly charts) from an Excel file.  Then back to the Word document for Section 4....

If I could choose mulitple documents to print, and choose how the document sections should be intermingled all from a dialog box, I could better discourage messy copy and paste operations from Excel to Word from people who don't want to learn a page layout application.
# April 10, 2006 3:01 PM

Harlan Grove said:

re tjtjjtjt on sections, Word documents are 1D. Text flows from beginning to end in a single, well-defined direction. In spreadsheets generally there are multiple dimensions. In Excel there are 2. How would you satisfy user A who wants A1:H120 as one section and I1:N50 as another, and user B who wants A1:BC40 as one section and A41:CZ100 as another section? That is, some users may want their sections to go right to left while others want them to go top to bottom. There'd have to be a mechanism for ordering (and reordering) sections.

Besides, sections can be simulated by using different worksheets for different logical sections. In Word, sections make sense. In Excel, they don't. As for combining multiple disk files into a single hardcopy document, what's so hard about pasting linked pictures?
# April 10, 2006 3:45 PM

tjtjjtjt said:

Well, I'm not a programmer, but I wonder if Excel Secttions could be tied to Named Ranges.

Why couldn't an Office Section object have a second dimension that Word would simply ignore?

I can't Picture Link hundreds of rows with any degree of ease.
# April 10, 2006 4:34 PM

Bob Umlas said:

When I entered text in the header and tried to color it, the font color on the Sheet ribbon was disabled (I must admit this was using dogfood version, not B1TR! -- at work we don't have SP2 for WinXP so I'm stuck testing this using DF!)
Is there another way to add color to the text?
# April 10, 2006 4:52 PM

Bob Umlas said:

When I tried putting in >256 characters in total across left, middle, right header, I got a message, "The number of characters you have entered exceeds the maximum amount allowed..." - I think it would be useful for all to specify what this maximum is (256, right?)
Agree?
# April 10, 2006 4:54 PM

Harlan Grove said:

Re Bob Umlas's comments about specifying the limit on the number of characters in header/footer sections, this could be a problem. Users could want full pathnames in the header or footer, and full pathnames can exceed 256 chars. For example, the following is a valid pathname on an NTFS drive under Windows XP (word-wrapped at backslashes, it should be all one line).

F:\0123456789ABCDEF\0123456789ABCDEF
\0123456789ABCDEF\0123456789ABCDEF
\0123456789ABCDEF\0123456789ABCDEF
\0123456789ABCDEF\0123456789ABCDEF
\0123456789ABCDEF\0123456789ABCDEF
\0123456789ABCDEF\0123456789ABCDEF
\0123456789ABCDEF\0123456789ABCDEF
\012345678abcde.xls

What happens when XL12 tries to print a file with such a long filename using &[Path]&[File] in the left footer? XL12 throws a runtime error?
# April 10, 2006 7:49 PM

Sam said:

I am not sure I understand what this feature is today and what it does tomorrow? Can you please elaborate on this when you have a moment?

"Second, we have added an “Ignore Print Areas” checkbox on the Print dialog, which allows users to print their entire sheet without having to remove their print areas first"

Thanks,
Sam
# April 11, 2006 2:05 AM

SteveA said:

One simple print feature I would like to see is ignore blank pages. Often when printing out a spreadsheet that ends up say on 3 pages wide, and 4 pages long, ie 12 pages, and because the data on the spreadsheet is not perfectly rectangular, some of the pages that print have no data on them, just empty cells.
The alternative solution is to have irregular print area, if that is possible, but this not be so neat.
# April 11, 2006 4:00 AM

Jim Rech said:

(Ignoring the current theme of complaining about the features you didn't add)

Great new features, Dave.  Everyone appreciated and welcome!
# April 11, 2006 9:38 AM

Harlan Grove said:

Methinks Jim Rech meant "Every one appreciated and welcome!"
# April 11, 2006 12:07 PM

leeloo said:

What Harlan Grove meant to say is "I think ..."
# April 11, 2006 1:23 PM

David Gainer said:

Greetings

Tjtjjtjt – I think there is a way to specify a different starting number, but I can’t remember off hand, so let me get back to you when I figure it out.  No to Roman numerals or sections.  Your idea of “compound documents” is an interesting one that we will think about in a future version,

Bob – the formatting controls are now working, so that is how we suspect people will colour text in the headers.  I will pass along your other comment.  Harlan, I believe we truncate.

Sam – the idea behind the feature is this – you have created a workbook with 10 sheets, each sheet containing a print range.  For some reason, you now want to print the entire book once, and then return to just printing what is in the print ranges.  You can now just check this box, and that saves you having to delete the 10 print ranges, print, and then add them back.

SteveA – thanks for the suggestion

Jim – thanks
# April 11, 2006 2:51 PM

David Gainer said:

Tjtjjtjt - You can specify a different starting number two ways.  

1.  From the page setup dialog > Page tab you can specify the First Page Number.  The page number token in Headers and footers will start from this number

2. In the header or footer itself you can change the starting number by typing &[Page]+num where is num is the number you want to add to the starting page number. IF num=2 then the first page number will be 3.

NOTE: we just noticed a h/f parsing bug with this that requires you to add a trailing space to the &[Page]+num string otherwise it will add an extra 10 pages to the number when parsed.  
# April 11, 2006 3:53 PM

Harlan Grove said:

leeloo,

Try looking up methinks in an English dictionary if you're having trouble understanding the term.
# April 11, 2006 4:18 PM

tjtjjtjt said:

Thanks, David.
I was hoping for a way to having different numbering on the one sheet.  So, my question should have been can I start at a number other than one for several spreadsheet pages and then designate another starting number?
The people using the data in Excel want it on one spreadhseet.  The people doing reporting divide the content into pieces and put it into a Word document.
I'll just keep having them paste into Word and let Word do all the layout work.
I'm glad to know why adding numbers to header didn't work properly.
# April 11, 2006 5:11 PM

leeloo said:

Methinks Harlan Grove is a humorless nitpick ;)
# April 11, 2006 5:47 PM

Harlan Grove said:

Nitpick certainly, but not humorless.
# April 11, 2006 6:56 PM

Shane Devenshire said:

Someone might want to check out the page numbering issue: not on should do this but you can enter &[PAGE]-10 and you get negative page numbers.  Another interesting one is &[PAGE]+1111111111 this gives 1111111112 which you might expect but add one more 1 --> PAGE]+11111111111 and I get -1773790776?

Shane
# April 15, 2006 12:31 PM

Jürgen said:

As working with Excel for many years i'm still waiting for the posibility of referencing a cell or formula for headers/footers. Users could get a running sum each page and s.th. like that. That would be a great new feature.
# April 17, 2006 3:38 AM
New Comments to this post are disabled
Page view tracker