Check out this awesome web application
I'm looking for help to display links or hyperlinks that some cells contain. Any suggestions?
I created this web form by following a tutorial, but I'm still learning and finding it challenging to understand all the code. If this task is too advanced for a beginner like me, I totally get it.
Here's a snippet of the code:
function doGet() {
return HtmlService.createTemplateFromFile('Index').evaluate();
}
/* PROCESS FORM */
function processForm(formObject){
var result = "";
if(formObject.searchtext){//Execute if form passes search text
result = search(formObject.searchtext);
}
return result;
}
//SEARCH FOR MATCHED CONTENTS
function search(searchtext){
var spreadsheetId = '1xsSrUT8jYm9dT_Mfi2UTy4BHjcD7TQVVtgsB1x1wgTE'; //** CHANGE !!!
var dataRage = 'Data!A2:Y'; //** CHANGE !!!
var data = Sheets.Spreadsheets.Values.get(spreadsheetId, dataRage).values;
var ar = [];
data.forEach(function(f) {
if (~f.indexOf(searchtext)) {
ar.push(f);
}
});
return ar;
}
And here's another excerpt from the code:
Index HTML file
<!DOCTYPE html>
<html>
... (code continues)
</html>
If you want to see sample data, click on the link below:
https://i.sstatic.net/UForg.png
For a preview of the photoshopped output, you can view it here.