How to Remove or Hide Gridlines in Google Sheets (Step by Step)

puneet-gogia-excel-champs

- Written by Puneet

Gridlines in Google Sheets are the fade lines that appear around cells to outline them and to indicate their boundaries clearly on the screen. They are beneficial for aligning data visually, which aids in data entry and review.

When you open a new Google Sheets spreadsheet, gridlines are there by default. But sometimes, you don’t want to have gridlines in the sheet. Right?

For this, you can hide gridline if you want. And when you want to have a clear look of the spreadsheet, you can remove the gridlines, which is one of the biggest reasons for me to remove them.

In this tutorial, you will learn simple steps to get rid of these gridlines. So, let’s get started…

Steps to Remove Gridlines in Google Sheets

As I said, to turn-off the gridlines, you need to follow simple two steps:

  • Once your Google Sheets is open, look at the top of the screen for the tab “View”. Click on this tab to open a drop-down menu.
  • After clicking the’ View’ tab, click the “Show” drop-down menu. From there, you need to click on the “Gridlines” option to uncheck the “Gridlines” option, which disables the gridlines from the sheet.

Note – Turing ON and OFF the gridlines is a sheets level option. When you hide gridline from one sheet, it doesn’t affect the setting in another sheet. So, if you want to hide gridline from all the sheets you need to go and make the changes to each sheet one by one. Otherwise, you can use the Google App Script which I have shared ahead in this tutorial.

Note – In Google Sheets, hiding gridlines doesn’t have a direct keyboard shortcut like those available for other options.

Is there any benefit of Removing Gridline in Google Sheets?

Yes, there a few benefits of not using the Gridlines:

  • Without gridlines, it’s easier to apply custom styles and formatting to make important data stand out.
  • Printing documents without gridlines can save ink or toner, which is particularly beneficial for large datasets.
  • Charts and graphs stand out better on a gridline-free background.

Disable Print the Gridlines (Print Without Gridlines in Google Sheets)

Let’s say you don’t want to disable the gridline, but you don’t want to print them while taking printout oon the paper. In this case, you can disable them in the print setting.

  • Open Print Settings – Click on File in the top menu, then select Print. You can also use the keyboard shortcut Ctrl + P (Cmd + P on Mac) to open the print setup directly.
  • Modify Print Settings – In the screen’s print preview panel on the right side, scroll down to the Formatting options section.
  • Uncheck the ‘Show gridlines’ – Click on the checkbox next to Show gridlines to uncheck it. This action will turn off the printing of gridlines.
  • Preview and Print – Preview the document in the print preview pane to ensure the gridlines are not there.

Note – Google Sheets does not save print settings by default. You will need to disable gridlines each time open your spreadsheet and want to print it.

Use Gridlines for Specific Cells and Hide for Rest of the Sheet

This is possible by hiding the Gridlines and then use Border around the range of cell where you want to have the gridlines.

Once you hide the gridline by using the method we have discussed above. You can use the below steps to apply the borders.

  • Select the cells where you want to show gridlines. You can click and drag to select a range of cells or use Ctrl-click (Cmd-click on Mac) to select multiple non-adjacent cells.
  • Click on the border icon (it looks like a grid) in the toolbar near the font style options to open the borders toolbar.
  • Choose “All borders” (or another specific border option) and select a border style that resembles gridlines. A thin grey line is typically best for mimicking standard gridlines.

This will give you a dark blank gridlines around all the selected cells, just like the following:

You can change the color and style of the border as well. For the same thing, you can also use a Google App Script Code, which can help you to do with a single click. Below is the code:

function customGridlines() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var fullRange = sheet.getDataRange(); // The range that includes all data cells
var specificRange = sheet.getRange("B2:D10"); // Change this to your desired range for 'gridlines'

// Remove all borders in the sheet first
fullRange.setBorder(false, false, false, false, false, false);

// Apply borders to specific cells
specificRange.setBorder(true, true, true, true, true, true, "#d3d3d3", SpreadsheetApp.BorderStyle.SOLID_MEDIUM);
}

To run this code, click on Extensions in the top menu bar. Select Apps Script from the dropdown menu. This action will open the Google Apps Script editor in a new tab.

In the Apps Script tab, you might see a default function, myFunction, in the editor. You can either modify this function or create a new one.

Remove Gridlines from Only Certain areas of my sheet?

None of the options available make this possible. The best solution is to apply the white border to the range from where you want to remove the gridlines.

function applyWhiteBorders() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var range = sheet.getRange("A1:B10"); // Specify your range here
range.setBorder(true, true, true, true, true, true, "white", SpreadsheetApp.BorderStyle.SOLID_MEDIUM);
}

With this App Script code, you can apply a a white border to a range. In this code, we have used the range A1:B10. When you run this code, it applies the white border to the range and hides the gridlines from the range.

This method is also helpful when you need to remove the gridline, not only for the presentation of the data. Because when you print the same sheet on paper, it won’t show you gridlines for the range you have applied these borders.

Last Updated: June 22, 2024

Leave a Comment