Hello,
I am new to appscript and working on a standalone script. I am reading data from a google sheet. The code works fine if I use 4 columns (text datatypes). When I include the fifth column (date datatype) on ws.getRange I get "Uncaught TypeError: Cannot read properties of null (reading 'slice')" on the browser console.
Function setDadosFinal() is on a tag on an html file.
Function dadosParaProcura() is on a separate .gs file.
Many thanks for any help.
Code:
function dadosParaProcura()
const ws = ss.getSheetByName("Registos");
return ws.getRange(2,1,ws.getLastRow()-1,5).getValues(); }
var data; <!--Global-->
function setDadosFinal(){
google.script.run.withSuccessHandler(function(dataReturned){
data = dataReturned.slice();
}).getDataForSearch();
}