How to Print Gridlines Through Shaded Cells in Excel
Question details
Users need to print their worksheets with gridlines visible across all data, but find that gridlines do not appear over cells formatted with a background fill color.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Preparing and formatting a spreadsheet containing shaded cells for physical printing or PDF export.
- Observed behavior
- Excel hides the default worksheet gridlines behind any cell fill colors during printing, and enabling the 'Print Gridlines' option in Page Setup does not override this behavior.
Check your Print Preview (Ctrl + P) to identify exactly which shaded ranges are missing gridlines before applying any formatting changes to your worksheet.
Apply Manual Cell Borders to Shaded Areas
Since fill colors naturally sit on top of default gridlines, the most reliable way to force gridlines to print is by manually applying cell borders to the shaded cells.
In Excel's rendering engine, background fill colors are an opaque layer that covers the default worksheet grid. The only way to ensure lines print across these filled areas is to draw explicit borders over them.
Click and drag your cursor to highlight all the cells that have a background fill color applied where the gridlines are currently missing.
Navigate to the 'Home' tab on the Excel ribbon and locate the 'Font' group. Click the small dropdown arrow next to the Borders icon.
Select 'All Borders' from the dropdown list. This will draw solid black lines around every individual cell in your selection.
Go to 'File' and select 'Print' (or press Ctrl + P) to view the Print Preview. The lines should now correctly appear across the shaded cells.

Print Flawless Spreadsheets with WPS Office
WPS Spreadsheet offers intuitive formatting tools that make it easy to apply custom borders, adjust print layouts, and ensure your shaded cells print exactly as they appear on your screen.
- 1. Open your workbook: Launch WPS Spreadsheet and open the document containing the shaded cells.
- 2. Highlight the cells: Select the data range or specific shaded cells where the gridlines are missing.
- 3. Apply All Borders: Go to the 'Home' tab, click the 'Borders' dropdown icon, and select 'All Borders'.
- 4. Preview and Print: Click the 'Print Preview' icon to confirm the borders display correctly over the fill colors, then proceed to print.

Frequently Asked Questions
Why does the 'Print Gridlines' option not work on shaded cells?
In spreadsheet software, fill colors are applied as an opaque layer over the default gridlines. When you print, the background color covers the standard grid, meaning only explicit cell borders will be visible on top of the shading.
Is there a way to remove the borders after printing?
Yes. Simply select the cells again, go to the Borders menu on the Home tab, and select 'No Border' to remove the lines and revert to your previous formatting.
Does this issue happen if I save the Excel file as a PDF?
Yes, saving or exporting a worksheet as a PDF uses the same rendering engine as printing. Fill colors will still hide the gridlines in the resulting PDF unless manual borders are applied.
Can I apply borders to the entire worksheet instead of just shaded cells?
Yes. You can press Ctrl + A to select the entire worksheet and apply 'All Borders'. However, this will draw borders around every single cell, including empty ones, which may consume more printer ink and look cluttered.




