I have ever experienced the same issue before. When the values with the date format are included in data
which is retrieved by getSheetValues()
, the returned values become null. I thought that the issue might occur when the date values are parsed and/or converted, when the values are sent from GAS to Javascript. By this, null is returned. In order to avoid this, I think that there are 2 patterns for your situation. Please chose one of them for your situation.
Pattern 1
For the function spreadsheetTest()
, modify as follows.
From :
return data;
To :
return JSON.stringify(data);
Pattern 2
For the function spreadsheetTest()
, modify as follows.
From :
var data = sheet.getSheetValues(1, 1, maxRows, 10);
To :
var data = sheet.getRange(1, 1, maxRows, 10).getDisplayValues();
If these are not useful for your situation, I'm sorry.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…