Horizontal Line in Excel Header and Footer


We would like to add a horizontal line to the header of an Excel file to be repeated on every page.

To add a horizontal-line we first need to create an image of a horizontal line in your favorite imaging software.

Create a PNG image 660 by 3 pixels and color it in some shade of gray.  Save the image with an appropriate meaningful name.  You will be using this file each time you need to add a line to Excel header of footer.
Now, insert this image into Excel header:

Note that &[Picture] code should be bellow any other code that you have in the header.

Now we have a nice Excel header with a horizontal line that serves as a visual separator:

The same technique applies to the Excel footer.  Here &[Picture] code should be above any other code that you have in the header:


There is one more method to place a horizontal line in Excel 2007 header, without using images.  Just with underscore symbols.  If you place this into your custom Excel header:

You will get these results bellow:

This is not bad, for a simple low-tech solution.

(Visited 32 times, 1 visits today)

Be the first to comment

Your question, correction or clarification Ваш вопрос, поправка или уточнение

Editor on duty will review your comment. Can't wait? Discuss your topic right now in forums, if you register and login.     Required fields are marked with * Ваше послание пойдет на просмотр в редакцию. Не можете ждать? Обсудите ваш вопрос прямо сейчас в форуме Русский Круг , ecли вы зарегистрируетесь и войдёте под своим именем.     Поля, обязательные для заполнения, помечены *
* *