Skip to footer content
EXCEL TOOLS

How to Print Gridlines in Excel: Every Method That Works (Complete Guide)

Gridlines look fine on screen and then vanish from the printed worksheet. That happens because Excel treats screen gridlines and printed gridlines as two separate settings, and printing is switched off by default on every new Excel worksheet.

The fastest fix takes about three seconds. Open the Excel file, go to the Page Layout tab, find the Sheet Options group, and check Print under Gridlines. Send the file to the printer and the light gray lines will appear around every cell that holds data.

Page Layout tab with the Sheet Options group circled, showing the Gridlines column with View checked That single print box answers the question for most people. The sections below cover the alternative routes, the multiple worksheets approach, the macro version, and the reasons the setting sometimes appears to do nothing.

Method 1: The Page Layout Tab (Fastest)

The Sheet Options group sits on the layout tab in every desktop version of Excel from 2007 onwards. Two columns appear there, Gridlines and Headings, each with a View checkbox and a Print checkbox. Checking Print is all it takes to enable gridlines on paper for the current sheet.

The setting applies to the entire worksheet, though only to that one sheet, so a workbook with twelve monthly tabs needs the change on each tab or the grouping trick described further down. Worth knowing before printing anything important: gridlines are a display feature rather than cell formatting, so they behave differently from cell borders, which are applied to specific cells and always print. Reports that need heavy visual structure, boxed totals, or lines that survive being copied into a Word document are usually better served by borders.

Gridlines also carry across to PDF output. Exporting through File > Save As > PDF respects the same print settings, which matters for anyone who distributes spreadsheets as PDFs rather than paper. Set the print option first, then export, or the PDF will arrive as a page of floating numbers with no structure at all.

Print preview split view showing the same sheet with gridlines print turned off and on

Method 2: The Page Setup Dialog Box

The classic page setup window offers the same control alongside every other print setting, which helps when several options need changing at once.

  1. Go to Page Layout.
  2. Click the small diagonal arrow in the bottom right corner of the Page Setup group.
  3. Open the Sheet tab of the dialog.
  4. Under Print, check Gridlines.
  5. Click Print Preview to confirm, then OK.

The Sheet tab of the page setup dialog box also holds Row and column headings, Black and white, Draft quality, and Comments. The neighboring Margins tab is where to adjust margins if the grid runs off the edge of the paper.

Page Setup dialog box open on the Sheet tab with the Gridlines checkbox highlighted

Method 3: From the File Tab and Print Preview Window

Changes can be made without leaving the print preview window.

  1. Press Ctrl + P, or open the File tab and choose Print.
  2. Scroll to the bottom of the settings column on the left.
  3. Click Page Setup.
  4. Open the Sheet tab and check Gridlines.
  5. Click OK and watch the preview refresh.

This route suits last minute checks, since the preview updates immediately and the printer stays one click away. The scaling menu in the same panel holds Fit Sheet on One Page, useful when a wide grid spills onto a second sheet of paper.

Method 4: Keyboard Shortcuts

No dedicated single key keyboard shortcut exists for printing gridlines, though the ribbon KeyTips get there quickly.

Press Alt on its own and letter badges appear over every ribbon tab. Press P for Page Layout, and a second set of badges appears over each button in that tab, including the Print box under Gridlines. Following the letters on screen toggles the setting without touching the mouse, and the sequence stays the same on a given Excel version, so it becomes muscle memory after a few uses.

Two related shortcuts save time alongside it:

  • Ctrl + P opens the print preview.
  • Ctrl + 1 opens the format cells window, where the Border tab lives.

Method 5: Print Gridlines Across Multiple Worksheets

Setting the option tab by tab wastes time on large workbooks. Group the sheets first.

  1. Click the first worksheet tab.
  2. Hold Ctrl and click each additional tab, or hold Shift and click the last tab to select a continuous run. Right clicking any tab and choosing Select All Sheets grabs the lot.
  3. With the group active, check Print under Gridlines on the Page Layout tab.
  4. Right click a tab and choose Ungroup Sheets when finished.

Every selected sheet receives the gridline settings simultaneously. Leaving sheets grouped afterwards causes accidental edits across all of them, so ungrouping straight away is a habit worth forming.

Screen Gridlines and Printed Gridlines Are Separate

The View tab carries its own Show group with a Gridlines box, and that checkbox controls the screen only. Clearing it will hide gridlines while editing without affecting the printout, and checking it will display gridlines on screen while the page still prints blank. Anyone who wants to remove gridlines from view but keep them on paper, or the reverse, needs both settings. Page Break Preview, also on the View tab, shows where the print layout will split.

Method 6: Apply Borders Instead

The default gridlines print in a light gray that some printers render faintly, and they cover only cells inside the used range that contain data. Borders give more control and solve both problems.

Select the range, press Ctrl + 1, open the Border tab, pick a line style, a border style, and a border color, then click Outline and Inside. The quicker route sits on the Home tab: the Borders dropdown in the Font group offers All Borders, Outside Borders, and a More Borders entry that opens the same format cells window for finer work. Choosing a desired color there produces lines far darker than Excel gridlines ever print.

To apply borders to all the cells at once, click the button in the top left corner of the sheet, above row 1 and left of column A, then apply the border to the selected cells. Borders print at full strength on any printer, survive export to PDF and Word, and print around empty cells, which gridlines refuse to do. That makes them the right choice for invoices, timesheets, and client facing reports where better readability matters more than speed.

Method 7: A VBA Macro

Workbooks that get rebuilt or exported regularly benefit from automation. Press Alt + F11 to open the VBA editor, then Insert > Module, and paste one of the following.

For the current sheet:

Sub PrintGridlinesOn()
    ActiveSheet.PageSetup.PrintGridlines = True
End Sub

For every sheet in the workbook:

Sub PrintGridlinesAllSheets()
    Dim ws As Worksheet
    For Each ws In ActiveWorkbook.Worksheets
        ws.PageSetup.PrintGridlines = True
    Next ws
End Sub

Run the macro with F5 or assign it to a button. Save the file as .XLSM to keep the code, since the standard .XLSX format discards macros silently.

Excel for Mac, Excel for the Web, and Google Sheets

Excel for Mac follows the same path. The Page Layout tab carries a Sheet Options group with the identical Print checkbox, and Cmd + P opens the print dialog where Page Setup can be reached.

Excel for the web offers a reduced print panel with no gridline control. Two workarounds exist: apply borders to the range, which print from the browser without issue, or click Open in Desktop App and use the ribbon method above.

Google Sheets hides the equivalent option inside File > Print, under Formatting, where a Show gridlines checkbox appears in the right hand panel. Files converted from Google Sheets to Excel arrive with the print setting cleared, so it needs setting again after conversion.

Common Issues and Troubleshooting

The box is checked but nothing prints. Cells with a fill color hide gridlines both on screen and in print, since the fill sits on top. Clear it through Home > Fill Color > No Fill, or apply borders to those ranges instead.

Gridlines print around data but stop at the edge of the table. Excel prints gridlines only within the used range, so blank rows and columns beyond the last populated cell stay empty. Setting an explicit print area through Page Layout > Print Area > Set Print Area extends the coverage, and borders fill the gap where the print area alone falls short.

Draft quality is switched on: Found on the Sheet tab of the setup dialog box, draft quality speeds up printing by dropping grid lines and graphics. Clear it.

The lines print far too faintly: Gridline color is adjustable through File > Options > Advanced, then scroll to Display options for this worksheet and pick a darker shade. Faint lines also point to a printer issue such as low toner or an economy mode setting in the printer driver, so check those before rebuilding the sheet.

The setting keeps resetting - Gridline settings save with the worksheet, so an Excel file opened from a template or regenerated by an export tool arrives with the default. Fix it in the template, or handle it programmatically.

Only one tab prints correctly - The setting is per sheet. Use the grouping method above.

Black and white printing is active. Also on the Sheet tab of the page setup window, this option strips color and can wash out light gray lines. Clear it and rely on gridline color instead.

Handling Gridlines Programmatically with IronXL

Spreadsheets produced by an application, a reporting job, or an export routine arrive with gridline printing switched off, and asking every recipient to check Print themselves scales badly. IronXL sets the option in C# before the Excel file ever reaches a user.

using IronXL;

WorkBook workBook = WorkBook.Load("QuarterlyReport.xlsx");

foreach (WorkSheet workSheet in workBook.WorkSheets)
{
    workSheet.PrintSetup.PrintGridlines = true;
}

workBook.SaveAs("QuarterlyReport-Print.xlsx");
using IronXL;

WorkBook workBook = WorkBook.Load("QuarterlyReport.xlsx");

foreach (WorkSheet workSheet in workBook.WorkSheets)
{
    workSheet.PrintSetup.PrintGridlines = true;
}

workBook.SaveAs("QuarterlyReport-Print.xlsx");
Imports IronXL

Dim workBook As WorkBook = WorkBook.Load("QuarterlyReport.xlsx")

For Each workSheet As WorkSheet In workBook.WorkSheets
    workSheet.PrintSetup.PrintGridlines = True
Next

workBook.SaveAs("QuarterlyReport-Print.xlsx")
$vbLabelText   $csharpLabel

The library reads and writes XLSX, XLS, CSV, and TSV without Excel or Office Interop installed, so the same code runs on a server, in a container, or inside a scheduled job.

Quick Reference

Goal Route
Fastest toggle Page Layout tab > Sheet Options > Gridlines > Print
Full print settings Page Setup dialog box > Sheet tab
Change during preview Ctrl + P > Page Setup > Sheet
Screen only View tab > Show group > Gridlines box
Multiple worksheets Group tabs, then check Print
Strong visible lines Ctrl + 1 > Border tab
Repeat automatically VBA macro or IronXL

Knowing how to print gridlines in Excel comes down to one checkbox that most people never find, plus a handful of settings that quietly override it. Checking Print under Gridlines on the Page Layout tab handles everyday reports, borders handle anything client facing, and grouping handles multiple worksheets in a single pass. For spreadsheets generated in code, where nobody is around to check a box, IronXL applies print settings, cell formatting, and formulas directly from a .NET application, and a free trial is available for testing against a real workbook.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...

Read More

Iron Support Team

We're online 24 hours, 5 days a week.
Chat
Email
Call Me