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

142
Vistas
How to search many sheets?

I have one main Google spreadsheet that has many sheets inside it, I am using a google script to search for specific data using name/password but I need to apply the search on all sheets in this main spreadsheet, please help me how to figure this out :

var sheetName = "Data"
  
var range = SpreadsheetApp.openById(spreadsheetId).getSheetByName(sheetName).getDataRange();
var data = range.getValues();
var ar = [];
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I believe your goal as follows.

  • You want to search a text from all sheets in a Google Spreadsheet.

In this case, I would like to propose to use TextFinder. When TextFinder is used, the text can be searched from all sheets in a Google Spreadsheet. The sample script is as follows.

Sample script:

function myFunction() {
  const spreadsheetId = "###"; // Please set Spreadsheet ID.
  const searchText = "sample"; // Please set the seatch text.

  const ss = SpreadsheetApp.openById(spreadsheetId);
  const ranges = ss.createTextFinder(searchText).matchEntireCell(true).findAll();
  const res = ranges.map(r => ({sheet: r.getSheet().getSheetName(), range: r.getA1Notation()}));
  console.log(res)
}
  • When this script is run, the list of the sheet name and a1Notation is returned. About this, please modify it for your actual situation.

References:

  • createTextFinder(findText) of Class Spreadsheet
  • Class TextFinder
about 4 years ago · Juan Pablo Isaza Denunciar
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