Headers, footers and printer settings in Excel: what a workbook's page setup keeps
Last updated: 28 October 2026
Short answer: Excel shows headers and footers only in Page Layout view, in Print Preview and on paper, so someone who opens a workbook in the usual Normal view does not see the "Draft for" line, the name or the note typed into one. Each sheet can also keep a first-page and an even-page header and footer that the standard says are ignored while their option is off, but which can still be in the file. A sheet's page setup can point to a printer settings part, which the standard calls a devMode part; the Windows DEVMODE structure that name suggests begins with the printer's name, and Microsoft lists printer paths among the personal information in a workbook. Read every sheet's headers and footers in Page Layout view or Page Setup, run Document Inspector on a copy, and check the file itself.
This page is about page setup. Cells outside the print area are in hidden rows, columns and cells; the folder a workbook was saved in, and its paths to other files, are in full paths in Excel workbooks; custom views named after a person are in co-authoring and the shared workbook; and what a PDF made from the workbook keeps is in metadata when exporting to PDF.
Headers and footers are not on screen in Normal view
Microsoft's page Headers and footers in a worksheet says: "Headers and footers are displayed only in Page Layout view, Print Preview, and on printed pages." A header typed for a printed draft, such as a recipient's name, "Internal" or a reviewer's initials, stays in the sheet after the printing is done, and someone who opens the workbook in Normal view does not see it. Each sheet has its own, and so does each chart sheet, which, the same page says, takes headers and footers only through the Page Setup dialog box.
The page also describes the options Different First Page and Different Odd & Even Pages. In the file, the standard quoted in Microsoft's Open XML documentation gives a sheet's header and footer settings six parts, odd, even and first-page headers and footers (headerFooter, ISO/IEC 29500-1, 1st edition). About the first page it says: "If false and firstHeader / firstFooter are present, they are ignored." About even pages: "If false then oddHeader / oddFooter is used, even when evenHeader / evenFooter are present." So the format allows a first-page or even-page header to stay in the file while nothing shows it, whatever put it there. Whether a given workbook has one, only the file itself shows.
The same standard lists a custom view among the places a header and footer can be kept, so a custom view can carry a header and footer of its own besides the sheet's.
Codes for the file path, the file name and the sheet name
A header or footer can hold codes that Excel fills in. The standard's list of them, in Microsoft's evenHeader reference, includes:
&Z, the code for "this workbook's file path";&F, the code for "this workbook's file name";&A, the code for "sheet tab name";&Dand&T, the date and the time;&G, the code for "picture as background": a picture in the header or footer, which is kept in the file as a part of its own.
The file keeps the code, not the path: the path, the file name or the sheet name is put in when the page is shown or printed. On the recipient's computer, a footer with the file path would show where they saved the workbook. On yours, it shows where you saved it, and a printout or a PDF you make from the workbook carries that path, which can include your user folder, a server or a client's folder name.
The printer settings part
A sheet's page setup can point to one more part. The standard describes the relationship on pageSetup as the "Relationship Id of the devMode printer settings part" (pageSetup). It is a part of its own, outside the sheet's XML, named in the sheet's relationships.
The standard's wording does not describe what the part holds. DEVMODE is the name of a Windows structure, and reading the part as one is an inference from that name. Microsoft's page DEVMODEW structure describes what it holds. Its first member, dmDeviceName, "For a printer, specifies the "friendly name"; for example, "PCL/HP LaserJet" in the case of PCL/HP LaserJet." It also has the paper form's name, and dmDriverExtra, "the number of bytes of private driver data that follow the public structure members": data that the printer's driver defines and that the page does not describe. A printer's friendly name is whatever it was called where it was set up, and it can name an office, a floor or a department.
Microsoft's page Remove hidden data and personal information by inspecting documents, presentations, or workbooks says a workbook can hold "printer properties (for example, printer path and secure print passcode)", and lists "Printer path information" among what its Document Properties and Personal Information inspector removes in Excel. Excel's macro reference lists the same kind of information as xlRDIPrinterPath, "Removes printer paths from the document information" (XlRemoveDocInfoType). Neither page says in which part of the file the printer path or the passcode is kept.
Where each one is in the file
| What | Where in the .xlsx | What it can say |
|---|---|---|
| Headers and footers | headerFooter in each xl/worksheets/sheetN.xml (and in xl/chartsheets), with oddHeader, oddFooter, evenHeader, evenFooter, firstHeader and firstFooter | The text someone typed, and codes such as &Z and &F; a first-page or even-page text that nothing shows |
| A custom view's page setup | customSheetView in the same sheet part, which can hold its own headerFooter | The same, for that view |
| Printer settings | A part of its own, named by the r:id on the sheet's pageSetup and the sheet's relationships | If it holds a DEVMODE, the printer's name, the paper, and data the printer's driver defines |
| The print area | A defined name _xlnm.Print_Area in xl/workbook.xml | Which cells print; every other cell is still in the file |
Check the page setup in Excel
- Work on a copy. For each sheet, select View › Page Layout and read the left, center and right header and footer; or open Page Layout › Page Setup, select Custom Header and Custom Footer on the Header/Footer tab, and read each section. Do the same for chart sheets, through Page Setup.
- Look at the Different First Page and Different Odd & Even Pages options: if one is on, read the first-page or even-page header and footer too. If they are off, the standard says a first-page or even-page text is ignored, so Excel may not show one that is still in the file; check the file as below.
- Remove what should not go out. The Headers and footers page says to select the header or footer text box and "Press Delete or Backspace", and, for several sheets at once: "To delete all headers and footers instantly, on the Header/Footer tab, select (none) in the Header or Footer box."
- In Excel for Windows, run File › Info › Check for Issues › Inspect Document on the copy. The Document Inspector page lists "Information in worksheet headers" and "Information in worksheet footers" under its Headers and Footers inspector, and "Printer path information" under Document Properties and Personal Information. The same page says these inspectors "can't be used in a workbook that has been saved as a shared workbook". Put back afterwards any page numbers you still want.
- The print area is saved with the workbook: Microsoft's page Set or clear a print area on a worksheet says "The print area that you set is saved when you save the workbook." It decides what prints, not what is in the file, so delete the cells outside it that the recipient should not have.
Check a copy of the file
- Make a copy, rename it to .zip and unzip it.
- Open each file in
xl/worksheetsandxl/chartsheetsand search forheaderFooter. Read every header and footer element inside it, the first-page and even-page ones as well, and look forcustomSheetViewtoo. An&in the text is written&in the XML. If a header or footer has&G, look forlegacyDrawingHFin the same sheet part: it names the drawing part that holds the picture, and that part can give the picture a title. - Open each file in
xl/worksheets/_relsandxl/chartsheets/_relsand look for a relationship whoseTypeends inprinterSettings; itsTargetis the part. If the part is not text, open it in a viewer that shows the bytes, and remember that in the DEVMODEW form of the structure the printer's name is in wide characters, two bytes each, which a plain text search may miss. - In
xl/workbook.xml, look for_xlnm.Print_Areato see each sheet's print area. - Finding nothing this way shows only that these searches found nothing, not that the file holds nothing else.
What ScrubDrop does
ScrubDrop reads the workbook in your browser; it is not uploaded. In both versions it never writes printer settings parts into the new file: each one is listed as "printer settings (printerSettings)" among the parts ScrubDrop does not keep, and the sheet's page setup no longer points to it. For free, one file at a time, it also lists the kinds of hidden data it supports, removes the document properties, comments and tracked changes, and lists custom views with the properties and removes them with the properties.
Headers and footers are kept in both versions and are not listed, apart from those inside custom views, which go with the custom views: ScrubDrop treats them as content that prints. That includes a first-page or even-page header or footer whose option is off, codes such as &Z, and a picture in a header or footer, which is kept and not listed; read and edit them yourself, as above. The print area is kept, and the number of cells outside it is listed so that you can decide whether they should go; ScrubDrop does not remove them, in either version. The result is read again with separate parsers, and a file that does not pass is not offered.
Questions
Does a footer with the file path put my folder names in the workbook?
The workbook keeps the code for the path, not the path itself; the path is filled in where the page is shown or printed. A printout or PDF you make shows where you saved the file, so check those before you send them.
Can a header be in the file if I never see it on any page?
Yes. The standard allows first-page and even-page headers and footers to stay in the file while their option is off, and then nothing shows them. Read the sheet part of a copy, or ask Document Inspector to remove header and footer information.
Does the printer settings part hold my printer's name?
It can. The standard calls it the devMode printer settings part without describing its contents; if it holds the Windows DEVMODE structure, as the name suggests, its first item is the printer's name. Microsoft lists printer paths among the personal information in a workbook but does not say where each is kept, so treat the part as personal information.
Sources: the Microsoft pages linked on this page were checked on 28 October 2026. ScrubDrop is not affiliated with Microsoft.
See the hidden sheets, comments, printer settings and other hidden data an .xlsx keeps, in your browser. Free: one file at a time; every supported kind of hidden data it finds is listed, and properties, comments and tracked changes are removed. Check a file.