Created
December 5, 2019 04:36
-
-
Save parzibyte/f54253817267157b713e7ad5b9719690 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const $btnExportar = document.querySelector("#btnExportar"), | |
$tabla = document.querySelector("#tabla"); | |
$btnExportar.addEventListener("click", function() { | |
let tableExport = new TableExport($tabla, { | |
exportButtons: false, // No queremos botones | |
filename: "Mi tabla de Excel", //Nombre del archivo de Excel | |
sheetname: "Mi tabla de Excel", //Título de la hoja | |
}); | |
let datos = tableExport.getExportData(); | |
let preferenciasDocumento = datos.tabla.xlsx; | |
tableExport.export2file(preferenciasDocumento.data, preferenciasDocumento.mimeType, preferenciasDocumento.filename, preferenciasDocumento.fileExtension, preferenciasDocumento.merges, preferenciasDocumento.RTL, preferenciasDocumento.sheetname); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment