I am using the Google Sheets and Slides APIs to read data from a sheet and create Google slides.
Some cells contain links, and I want to be able to show them as links in the slides as well. Is there a way to get the hyperlink for the cell using the Google Sheets API?
I am getting the value in the cell by the following :
var ss = SpreadsheetApp.openByUrl(dataSpreadsheetUrl);
var sheet = ss.getSheetByName('countryData');
// Use the Sheets API to load data, one record per row.
var values = sheet.getRange('A2:W10').getValues();
for (var i = 0; i < values.length; ++i) {
var row = values[i]; var country = row[0];
//name in column 1
Logger.log(country);
}
Is there a method on the values that I can call to get the hyperlink on that particular cell? (e.g. for the value Afghanistan, the hyperlink on sheet is the BBC page for Afg.)
I am using the following to replace the token country in the slides using :
shape.getText().replaceAllText('{{country}}',country);