I have looked at the documentation on your site. But its from 2018 and it seems to have been updated since then.
So how do I do to add html Macro?
My objective is to embed a google chart.
One way would be to insert Iframe though the iframe macro.
But I wanted to try this code:
function drawChart() {
var queryString = encodeURIComponent('SELECT A, B LIMIT 3 OFFSET 0');
var query = new google.visualization.Query('https://docs.google.com/spreadsheets/d/1xxxxxxxxxxxxxxxxedit?gid=0&headers=1&tq=' + queryString);
query.send(handleQueryResponse);
}
function handleQueryResponse(response) {
if (response.isError()) {
alert('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage());
return;
}
var data = response.getDataTable();
var chart = new google.visualization.ColumnChart(document.getElementById('columnchart'));
chart.draw(data, { height: 400});
}
How can I do that?