How to Remove Gridlines in Google Sheets (3 Easy Ways)

Gridlines are the light-colored lines that outline each cell in a Google Sheets worksheet. They make your worksheet look neat and create clear boundaries between cells.

If you want to create a cleaner look for your spreadsheet, removing gridlines is a simple process.

In this article, I will walk you through four different methods using which you can remove the gridlines from Google Sheets, along with some tips and notes.

Let’s get going!

Remove Gridlines Using the Toolbar

The easiest way to remove gridlines is through the options available in the toolbar.

Below is an example where you can see a demo dataset with gridlines that I want to remove.

Now, let’s see how I can get rid of these gridlines from the entire sheet using the Toolbar.

Below are the steps to remove gridlines from the entire worksheet using the Toolbar.

  1. Go to the View menu.
  2. Hover the cursor over the Show option (this will show you additional optional related to it).
  3. Click on the Gridlines option. By default, it is checked, meaning the Gridlines are active on the entire sheet. Once you click on it again, the check vanishes, suggesting the Gridlines are now removed.

Voilà! You have successfully removed the gridlines from your worksheet.

If you remove Gridlines using the Toolbar method, it is only removed for the current sheet. You must go to each sheet individually and remove the Gridlines if you have multiple sheets.

Remove Gridlines from Specific Range (Using Borders)

When you remove gridlines through Toolbar, you always remove them from the entire sheet and not for a selected range say tabular data spanning across a few rows and columns.

This is where the Borders can be used with some customizations to provide you a way to remove gridlines from a specific range. Let’s explore how.

For this section, we are again using a sample dummy Sales Amount data as shown below.

In Google Sheets, select all the rows from the sheet using the Ctrl + A shortcut or by going to the left of the columns and clicking on the select entire data option.

  1. From the Menus ribbon placed below the first horizontal ribbon, navigate towards Borders and click on it.
  2. Select the All borders option to apply the border grid to the entire sheet.
  3. Change the color inside the Border color picker to White (Hex Code: #ffffff, RGB Code: 255, 255, 255).

Now, if you look at the sheet again, the Gridlines are gone! Feeling like a Google Sheets Wizard already? 🪄🧙‍♂️

What happens under the hood is, when you apply All borders to the entire sheet, it overtakes the standard gridlines.

As soon as you change the color to this border as White, the entire border is invisible, and apparently, you can’t see any Gridlines.

So, practically speaking, Gridlines are still active for the sheet (Which you can check through View > Show > Gridlines check), but just the appearance is set in a way that they are not visible at the front. Quite smart, yeah?😉

Note: This method also works when you want to remove gridlines from a specific range and not the entire sheet.

Remove Gridlines while Printing

Through this section of the article I will introduce you to another approach using which you can remove the Gridlines at the time of printing the Google Sheet.

While printing the Google Sheets, you will notice that it, by default, prints the Gridlines irrespective of whether you are printing some part of it or the entire sheet itself.

Now, for this demo, the sample data you are using is as shown below and is stored in the sheet named “Print Method.”

  1. Select the range you want to print.
  2. Go to the File menu from the Toolbar placed at the top.
  3. Click on the Print option placed at the end of the list of options. It will open up the print settings menu.

4. When the Print settings window opens up, go to the Formatting dropdown and expand the same by clicking on it.
5. The Show gridlines option is checked by default. Uncheck that option and proceed further with printing the sheet.

Pro Tip: You can also use the keyboard shortcut Ctrl + P to skip steps number 2 and 3 and save some time. 😉

This is one of the ways where you can remove Gridlines while printing the sheet.

However, if you have applied borders to the ranges you were printing, then unchecking the Show gridlines options will not remove those borders, so be cautious about them.

If you don’t even want the borders, make sure you remove them from the sheet itself.

Remove Gridlines Using Apps Script

I personally love automating repetitive tasks, and removing Gridlines is one of those. Therefore, the current section where I will teach you to write code in Apps Script itself to remove the Gridlines automatically is one of the sections I was eagerly waiting for! 😁

If you want to know more about what Apps Script is, how the tool works, the best guidelines to follow while coding into it, and more, this article could be a great starting point.

Following is the dataset you will be using for this demo. The sheet named “Apps Script Method” holds this data.

To launch the Apps Script in Google Sheets –

  1. Click on the Extensions menu from the Toolbar and hover over Apps Script inside the dropdown that expands.
  2. Click on the Apps Script option, and it will launch this tool into a new browser window.

You’ll see a blank script file once you’re in the Apps Script editor. This is where you’ll write the following script to remove gridlines. Feel free to copy and paste it to save time. Nobody from our website mind you doing this! 😁

function removeGridlines() {
  // Get the active spreadsheet
  var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
  
  // Get the active sheet
  var sheet = spreadsheet.getActiveSheet();
  
  // Get the range of the entire sheet
  var range = sheet.getRange("A : Z");
  
  // Set the gridline color to white
  range.setBorder(true, true, true, true, true, true, "white", SpreadsheetApp.BorderStyle.SOLID);
}

If the code above looks too overwhelming at the start, don’t worry! Let me explain.

Explanation

  • The first line of the code (as you might have guessed already) defines a new function named removeGridlines.
  • In the following line, you are declaring a variable named spreadsheet using the var keyword. It gets the active spreadsheet using SpreadsheetApp.getActiveSpreadsheet() method. The SpreadsheetApp class is part of the Google Apps Script service that allows interaction with Google Sheets.
  • Now that we have accessed the spreadsheet, the next set of actions would be to access a subset of it, which is a sheet. This is precisely what your next line of code does. It declares a variable named sheet. It gets the active sheet of the previously obtained spreadsheet using the spreadsheet.getActiveSheet() method.
  • To extend this logic further, you are now interested in accessing the cells from the sheet that is accessed in the previous step. This is achieved with the following line of code where you declare a variable named range. It gets the data range of the entire sheet using a sheet.getRange(“A:Z”). In this case, the data range is essentially all the rows and columns from the sheet.
  • Then comes the final line of code, where all the magic happens! This line sets the border of the range to make gridlines invisible. The parameters in setBorder determine which borders to set. In this case, all six borders (top, bottom, left, right, vertical, horizontal) are set to “white” color with a SOLID BorderStyle, effectively hiding the gridlines.

You will see the Run (▶) button in the Apps Script Toolbar. Click on this button to run this script.

Remember that if you are using the Apps Script for the first time, it will definitely ask you to Authenticate using your Gmail account.

That is not the case for me because I frequently use this tool, and my Gmail Authentication is already done.

Pro Tip: You might see in the above screenshot itself where the Apps Script is named Remove Gridline. You will see the name something like “Untitled.” It is always a good practice to give an appropriate name to the script so that whenever in the future you are coming back, you or anyone else accessing it knows what this script does.

Once the script runs successfully which, you can validate through the Execution log, Where there will be two notifications, “Execution Started” and “Execution Completed,” deliberately letting you know that the code you wrote is working as expected.

Now, go back to the “Apps Script Method” sheet, and you will see that the Gridlines are now removed from the entire sheet. That’s what you wanted!

Note: If in case there is some bug in your code, you will apparently get to know about it at the Execution stage through the Execution log. Where the Execution will definitely start but will fail to complete. The error message will be something on the similar lines below. You then can debug it and amend the script again.

Gridlines vs Borders in Google Sheets

In Google Sheets, both gridlines and borders are used to organize and differentiate data visually, but they serve different purposes and have distinct characteristics:

Gridlines in Google Sheets

  • Purpose: Gridlines are the faint lines that separate each cell in Google Sheets. They provide a structure to the spreadsheet, making it easier to read and enter data.
  • Visibility: By default, gridlines are enabled and visible in all sheets.
  • Customization: You can toggle gridlines on or off for the entire sheet, but you cannot customize their color, style, or thickness. The option to show or hide gridlines is usually found under the “View” menu.
  • Impact on Printing: If gridlines are visible on the sheet, they can be included in printouts. However, this is often a separate setting in the print options.

Borders in Google Sheets

  • Purpose: Borders are used to outline cells or a group of cells. They are excellent for highlighting specific data, creating visually distinct sections in your spreadsheet, or emphasizing important information.
  • Customization: Borders can be highly customized. You can choose different colors, styles (such as solid, dashed, or dotted lines), and thicknesses. You can apply borders to individual cells, a range of cells, or entire rows/columns.
  • Visibility and Control: Unlike gridlines, borders are not automatically applied to cells. You need to manually add them wherever needed. This can be done using the border tool in the toolbar or the cell format options.
  • Impact on Printing: Borders that you apply to cells will appear in printouts, reflecting the exact style and color you set.
FeatureGridlinesBorders
PurposeProvide structure to the entire spreadsheet.Highlight, separate, or emphasize specific cells or areas.
VisibilityDefault visible; can be toggled on or off.Not automatically applied; added manually as needed.
CustomizationLimited; only toggle on/off for the whole sheet.Highly customizable in color, style, and thickness.
Impact on PrintingCan be included in printouts if enabled.Appear in printouts with set style and color.
User InteractionServe as a visual aid, do not interact with data.Enhance readability and presentation, do not interact with data.

Are there any other unique ways apart from the four mentioned above that you know can be used to remove gridlines? My comment section is all yours!

Other articles you may also like:

Leave a Comment