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

146
Views
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 answers
Answer question

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 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!