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
// Caso queira gerar planilhas use array na var. conteudo | |
let conteudo = 'Conteúdo que estará dentro do arquivo'; | |
let nomeArquivo = 'Nome do arquivo + .extensão'; | |
var blob = new Blob([conteudo], { type: 'text/csv;charset=utf-8;' }); | |
if (navigator.msSaveBlob) { // IE 10+ | |
navigator.msSaveBlob(blob, nomeArquivo); | |
} else { | |
var link = document.createElement("a"); |