V
V
Vladimir Zuev2020-07-21 15:29:06
Google Apps Script
Vladimir Zuev, 2020-07-21 15:29:06

How to pass data from table to sidebar?

Hello.
There is a table. It has data on it. I receive this data in an array.
Receipt Code

function getTemplateBase(){
 const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("data");
  let lRow = sheet.getLastRow();
  let range = sheet.getRange(2,1,lRow,4);
  let values = range.getValues();
    //Logger.log(values);
return values;
};

Now I think to transfer them to index.html with the help
let data = google.script.run.getTemplateBase();
But nothing happens. How to pass data from table to sidebar? Please help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mityayka1, 2020-07-23
@vladd56

The result of executing the gs function can only be passed as an argument to the function specified in .withSuccessHandler()
You have already been told about this in one of the answers

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question