let date = new Date();
let result = date.toLocaleDateString("fr-CA",{year:"numeric", month:"2-digit", day:"2-digit"});

document.getElementById("fecha").innerHTML=result;

function exportExpedienteTarjetaToExcel() {
    event.preventDefault();
    event.stopPropagation();    
    let downloadLink;
    let dataType = 'application/vnd.ms-excel';
    let tableSelect = document.getElementById('grid');
    let tableHTML = tableSelect.outerHTML.replace(/ /g, '%20');
    filename = 'ExpedienteTarjeta.xls';
    downloadLink = document.createElement("a");
    document.body.appendChild(downloadLink);
    if (navigator.msSaveOrOpenBlob) {
        let blob = new Blob(['\ufeff', tableHTML], { type: dataType });
        navigator.msSaveOrOpenBlob(blob, filename);
    } else {
        downloadLink.href = 'data:' + dataType + ', ' + tableHTML;
        downloadLink.download = filename;
        downloadLink.click();
    }
}