Excel to PDF without losing formatting

An Excel PDF that looks wrong almost always looks exactly like the print preview, which nobody opened. Column widths, colours, page breaks and fonts each answer to a page setup choice. To convert Excel to PDF without losing formatting, check six settings before you export and look at the preview once. This guide names them and says which causes which symptom.

Excel to PDF

How to keep Excel formatting in the PDF

  1. Open the print preview

    File, Print shows the pages exactly as the PDF will hold them. Page down through every page before changing anything.

  2. Fix the page breaks

    View, Page Break Preview. Drag a blue line so a table is not split across pages, and set Scale to Fit Width to 1 page if a column spills.

  3. Check the Sheet options

    Page Layout, Page Setup, Sheet tab. Untick Black and white and Draft quality. Tick Gridlines only if you want them.

  4. Export and compare

    Export the PDF, open it next to the workbook, and read the widest column and the last page.

Why the PDF looks different from the screen

The screen shows the sheet at any zoom with gridlines, frozen panes and infinite width. The PDF shows pages. Excel maps the sheet onto pages using the print settings, and every difference between the two views comes from that mapping. Nothing in the export step itself changes a colour or a font; the choices are all made before it runs.

That is good news, because the print preview under File, Print is a faithful picture of the PDF. If the preview is right, the PDF is right. The export dialogue itself is described in Convert Excel to PDF.

What survives in the browser tool

Excel to PDF draws cell values with their fonts, sizes, weights, colours, fills, alignment, wrapping, borders and merged ranges, and can add gridlines, row and column labels and page numbers. It starts from each sheet's own paper, orientation and margins, so a workbook already laid out to print converts the way it was laid out.

What it leaves out it names before you convert: charts, images, shapes, comments, pivot tables and conditional formatting are not drawn. A formula prints the value the workbook last stored for it, because nothing here recalculates a sheet. Text outside Western European Latin is refused with an error rather than drawn as empty boxes, since the pages use the standard fonts every PDF reader carries. When the answer has to include a chart, Excel's own export is the route, and the settings below decide how it lands.

Column widths and cells full of hashes

A cell that shows a number on screen can show hash marks in the PDF. Print font metrics differ slightly from screen metrics, and a number that fits by a pixel on screen does not fit on paper. Widen the column by a character or use Format Cells, Alignment, Shrink to fit on the numeric columns. Wrapped text can grow a row by a line for the same reason, pushing a page break down.

Merged cells that straddle a page break are split between the pages, with the text on the first. Move the break in Page Break Preview or unmerge and centre across selection instead.

Colours, fills and gridlines

Two boxes in Page Setup, Sheet strip formatting on purpose. Black and white turns every fill and font colour to black or white. Draft quality skips gridlines and most graphics. Both are unticked by default, but a workbook that once went to a mono laser printer may still have them on. Conditional formatting prints as displayed, including colour scales and data bars.

Gridlines never print unless Page Layout, Sheet Options, Gridlines, Print is ticked, which is why a PDF looks emptier than the screen. Cell borders always print. If the sheet relies on gridlines to be readable, tick the box or add light borders.

Page breaks, scaling and the losing formatting complaint

Most reports of Excel to PDF losing formatting are a table cut across two pages or shrunk to an unreadable size. Both are scaling. View, Page Break Preview shows every break as a line you can drag. Page Layout, Scale to Fit sets how many pages wide the sheet may be. The trade-off between fitting and legibility is worked through in Fit an Excel sheet on one PDF page.

Print Titles under Page Layout repeats a header row on every page. Without it, page two of a table is a grid of numbers with no column names, which reads as lost formatting even though every cell is intact.

Fonts, charts and hidden things

Excel embeds the fonts it uses, so a PDF opened on another machine keeps them. A font that is not installed on the exporting machine is already substituted on screen, and the PDF shows the substitute. Charts export as vector drawings at the size they occupy on the sheet. If a chart is selected when you export, Excel exports only the chart, on its own page. Click a cell first.

Hidden rows and columns stay hidden in the PDF, and rows removed by a filter are left out. Hidden sheets are skipped from a workbook export. Comments print only when Page Setup, Sheet, Comments is set to As displayed or At end of sheet.

Comparing two exports

When a colleague says the PDF changed, put the two files into Compare PDF. It renders both in this tab, shows the pages side by side with the differences marked, and lists the text that changed, without uploading either file. That separates a real layout shift from a different Excel version's rendering.

The same comparison settles an argument about which route to use: export the workbook both ways and look at what actually differs. The rest of the spreadsheet guides sit under PDF, Word and Excel help.

Questions people ask

Why are there hash marks in my Excel PDF?
A number that fits on screen is a fraction too wide in print metrics. Widen the column or turn on Shrink to fit for those cells.
Why did the colours disappear in the PDF?
Page Setup, Sheet has a Black and white box. Untick it. Draft quality, next to it, drops gridlines and graphics.
Why is my table split across two pages?
A page break falls inside it. Open View, Page Break Preview and drag the line, or set Scale to Fit Width to 1 page.
Why does the PDF have no gridlines?
Gridlines print only when Page Layout, Sheet Options, Gridlines, Print is ticked. Borders print regardless. The browser tool has its own gridlines switch.
Why did the export contain only a chart?
A chart was selected. Excel exports the selection when it is a chart. Click any cell and export again.
Does the browser converter keep my conditional formatting?
No. It draws cell values with their stored fonts, colours, fills, borders and merges. Conditional formatting, charts, images and shapes are not drawn, and the page says so before you convert.

Do it now

The tool runs in this browser. Your file never leaves the machine, and the result is checked before you download it.

Excel to PDF

Where to go next