Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

153
Views
Ejecute este script en todas las pestañas excepto en la pestaña "Principal"

Tengo este script funcionando bien, pero no estoy seguro de cómo hacer que se ejecute en todas las pestañas que no estén etiquetadas como "Principal". ¡Gracias por adelantado!

 function hideRows() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var s = ss.getSheetByName("Dude"); // Enter sheet name var row = s.getRange('A2:A').getValues(); // Enter column letter that has the text "hide" and "unhide" var cell = s.getRange('A1').getValue(); s.showRows(1, s.getMaxRows()); for(var i=0; i < row.length; i++){ if(row[i] != cell) { s.hideRows(i+2, 1); } // Value to hide } }

Jerónimo

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Ejecutar en todas las hojas excepto Principal

Supongo que está ejecutando el disparador onEdit.

 function hideRows(e) { const s = e.range.getSheet(); if(s.getName() == "Main") return; var row = s.getRange(2,1,s.getLastRow() -1 ).getValues().flat(); var cell = s.getRange('A1').getValue(); s.showRows(1, s.getLastRow()); for (var i = 0; i < row.length; i++) { if (row[i] != cell) { s.hideRows(i + 2, 1); } } }

Quiere excluir más hojas

 function hideRows(e) { const s = e.range.getSheet(); const ex = ['Main','Sheetx'];//excluded sheet names const idx = ex.indexOf(s.getName()); if(~idx) return; var row = s.getRange(2,1,s.getLastRow() -1 ).getValues().flat(); var cell = s.getRange('A1').getValue(); s.showRows(1, s.getLastRow()); for (var i = 0; i < row.length; i++) { if (row[i] != cell) { s.hideRows(i + 2, 1); } } }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!