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

147
Vistas
Not getting response back in webapp

I am new in app script and trying to make simple webapp, but I am not getting any return from apsscript when webpage is loading, it is returning null instead

Here is the code:-

function loadTest()
{
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  const ssname = ss.getSheetByName('Sales');
  const range = ssname.getDataRange().getValues();
  return range
}

Client side Code:-

document.addEventListener('DOMContentLoaded',(event)=>{
         const startTime = new Date()
         google.script.run.withSuccessHandler(function(e){
         console.log(e)
         }).loadTest()
       })
        
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Seems like you're trying to return prohibited elements like date from server side of webApp, which is making request fail and client getting null as a return .

Try following modification, changing this:-

const range = ssname.getDataRange().getValues();

To this :-

const range = ssname.getDataRange().getDisplayValues();

Reference:-

Parameters and Return Values

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