How I am learning to program with a sequence of commands and I would like to consult information from a data sheet to HTML, but I can not do it. Try to do the same as this in this sequence create the table and then insert the data but I can not get it.
<!DOCTYPE html>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons.css">
<script>
function mostrar(id,id2,id3){
var division = document.getElementById(id); //se define la variable "el" igual a nuestro div
var indice = document.getElementById(id2).selectedIndex;
if( indice > 0 ){
division.style.display = ''; //damos un atributo display:none que oculta el div
var ss = SpreadsheetApp
.openById("")
.getSheetByName("Mantenimiento correctivo");
var ultimoRegistro = ss.getLastRow()+1;
var data = ss.getRange(1,ultimoRegistro).getValue();
var tabla = document.getElementById(id3);
}
else
{
division.style.display = 'none';
}
}
}
</script>
<!--<html>
<head>
<base target="_top">
</head>
-->
<body bgcolor="e3e5e8">
<br><br>
<div align="center" >
<select id="option" name="nombre_area">
<option value="">Selecciona opción</option>
<option value="1">Administración</option>
<option value="2">Vestidores Mujeres</option>
<option value="3">Alberca</option>
</select>
<br>
<button id="buscar" onClick="mostrar('Mostrar_Tabla','option','Consulta')">Buscar</button>
<br><br><br>
</div>
<center>
<div id="Mostrar_Tabla" style="display:none">
<table border="1" id="Consulta">
<caption>Consulta de solicitudes de mantenimiento</caption>
<tr>
<th>Area</th>
<th>Folio</th>
<th>Tema</th>
<th>Descripción</th>
<th>Fecha de registro</th>
<th>Fecha de fin</th>
<th>Estatus</th>
<th>Autorización</th>
<th>Fuera de servicio</th>
</tr>
</table>
</div>
</center>
<!--
</body>
</html>
-->