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

49
Vistas
Header row values not saving into array

Here's my table: https://docs.google.com/spreadsheets/d/1QsP9zWOZHretwohq5e_2puQl0V0IMKHa-E-NJtBU4B4/edit?usp=sharing

I'm trying to put all values of the first row (the headers) into an array using this code:

for(let i=0;i<Cimiteri.length;i++)
  {
    var copySheet=as.getSheetByName('Date '+Cimiteri[i]);
    var ValoriA = copySheet.getRange(1,1,copySheet.getLastColumn()-1).getDisplayValues();
    for(let k=0;k<ValoriA.length-1;k++)
    {
      Logger.log(ValoriA[k]);
    }  

The problem is, some of my headers are not beign saved inside the array, "date in ordine" and "20/09/2021 Occupati" are skipped and I can't figure out why.

Edit: A cup of coffee later:

for(let i=0;i<Cimiteri.length;i++)
  {
    var copySheet=as.getSheetByName('Date '+Cimiteri[i]);
    var ValoriA = copySheet.getRange(1,1,1,copySheet.getLastColumn()-1).getDisplayValues().flat();
    for(let k=0;k<ValoriA.length-1;k++)
    {
      Logger.log(ValoriA[k]);
    }  
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Remove the loop and just look at:

Logger.log(JSON.stringify(copySheet.getRange(1,1,copySheet.getLastRow(),copySheet.getLastColumn() -1).getDisplayValues();)):
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