Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

265
Vistas
How can I hide rows in more than one Sheet using Apps Script?

I have been creating a complex spreadhseet on Google sheets that uses data from one 'tab' to populate information in other 'tabs'.

The way I have done this leaves gaps in the tables in the other 'tabs' and therefore I would like to be able to hide all of the rows that have gaps, in all of those specific 'tabs'.

/** @OnlyCurrentDoc */

function onOpen() {
  SpreadsheetApp.getUi().createMenu("Custom Filter")
    .addItem("Filter rows", "filterRows")
    .addItem("Show all rows", "showAllRows")
    .addToUi();
}

function filterRows() {
  var sheet = SpreadsheetApp.getActive().getSheetByName("Jordan"); //Here, I need to find a way to specify more than one sheet
  var data = sheet.getDataRange().getValues();
  for(var i = 5; i < data.length; i++) {
    //If column B is blank then hide the row.
    if(data[i][1] === "") {
      sheet.hideRows(i + 1);
    }
  }
}

function showAllRows() {
  var sheet = SpreadsheetApp.getActive().getSheetByName("Jordan");
  sheet.showRows(1, sheet.getMaxRows());
}
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda