I have these two functions to generate the excel, have styles in by means of classes, how can I do so that when exporting the excel shows with the styles that I have added or in what way should I add them? / p>
$("#btnExport2").click(function(e) {
var datos=$("#cifrasEscala").val();
if(datos=='pesos'){datos='Pesos';}
if(datos=='miles'){datos='Miles%20de%20Pesos';}
if(datos=='millones'){datos='Millones%20de%20Pesos';}
generaexcel("<center><h3>Cuenta de Capital Aportacion Actualizad al "+meses[$("#periodo").val()]+" "+$("#year").val()+"<br>("+datos+")</h3><br>",'CUCA'+meses[$("#periodo").val()]+"del"+$("#year").val()+'.xls','cucas');
});
function generaexcel(content,nombreex,div)
{
var tmpElemento = document.createElement('a');
var data_type = 'data:application/vnd.ms-excel;';
var tabla_div = document.getElementById(div);
var tabla_html = tabla_div.outerHTML.replace(/ /g,'%20');
tabla_html=tabla_html.replace(/<img/g,'<a');
tabla_html=tabla_html.replace(/é/g,'e');
tabla_html=tabla_html.replace(/Ó/g,"O");
tabla_html=tabla_html.replace(/ó/g,"o");
tmpElemento.href = data_type + ',' +content+ tabla_html;
tmpElemento.download = nombreex;
tmpElemento.click();
}