1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <button onclick="getExcel()">
- Get excel
- </button>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.5/FileSaver.min.js"></script>
- <script>
- async function getExcel() {
- const res = await fetch('supervisor_excel.php', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify([
- {
- "profesor_id": 1089,
- "estado_supervisor_id": 1,
- "horario_id": 3538,
- "registro_id": 1,
- "registro_fecha": null,
- "registro_retardo": null,
- "registro_justificada": null,
- "registro_fecha_ideal": "2023-08-03",
- "comentario": "Hola mundo",
- "registro_fecha_supervisor": "2023-08-03 12:21:38.336147",
- "supervisor_id": 6,
- "justificacion": null,
- "fecha_justificacion": null,
- "horario_hora": "12:00:00",
- "horario_fin": "13:30:00",
- "horario_grupo": "MG 45030102",
- "horario_dia": 4,
- "dia": "jueves",
- "duracion_id": 2,
- "duracion": "01:30:00",
- "carrera_id": 439,
- "carrera": "LICENCIATURA EN INGENIERÍA ELECTRÓNICA PARA SISTEMAS INTELIGENTES",
- "facultad_id": 28,
- "facultad": "FACULTAD DE INGENIERÍA",
- "periodo_id": null,
- "periodo": "LICENCIATURA: agosto - noviembre 2023",
- "materia_id": 191,
- "materia": "Dinámica",
- "nivel_id": 1,
- "nivel": "Licenciatura",
- "salon_id": 1245,
- "salon": "ING MM 208",
- "nombre": "Asistencia",
- "estado_color": "success",
- "estado_icon": "ing-autorizar",
- "profesor_nombre": "ISRAEL WOOD CANO",
- "profesor_clave": "008999",
- "profesor_correo": "israel.wood@lasallistas.org.mx",
- "profesor_grado": null,
- "usuario_id": 6,
- "usuario_nombre": "Francisco Javier Garrido Alfaro",
- "usuario_correo": null,
- "usuario_admin": false,
- "usuario_clave": "ad011538",
- "rol_id": 7
- }
- ])
- });
- const blob = await res.blob();
- saveAs(blob, 'excel.xlsx');
- }
- </script>
|