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

309
Views
Excluir hojas de la lista de nombres de hojas con script

Encontré este script que puede crear una lista de todos los nombres de las hojas en una hoja de Google usando el script de la aplicación.

Pero me gustaría excluir algunas de las hojas de la lista. Por ejemplo, si no quiero "Hoja 2" y "Hoja 4" en la lista

 function sheetnames() { var out = new Array() var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets(); for (var i=0 ; i<sheets.length ; i++) out.push( [ sheets[i].getName() ] ) return out }
about 4 years ago · Santiago Gelvez
2 answers
Answer question

0

function sheetNames() { const exclude = [`Sheet1`, `Sheet2`] return SpreadsheetApp.getActiveSpreadsheet() .getSheets() .map(sheet => sheet.getName()) .filter(sheet => !exclude.includes(sheet)) }
about 4 years ago · Santiago Gelvez Report

0

Hojas seleccionadas excluidas

 function sheetnames() { var out = new Array() var exA = ["Sheet1","Sheet2","Sheet3"]; var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets().filter(sh => !~exA.indexOf(sh.getName())); for (var i=0 ; i<sheets.length ; i++) out.push( [ sheets[i].getName() ] ) return out }
about 4 years ago · Santiago Gelvez 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!