-3
I can only convert to .xls or .pdf but I need to .xlsx. The simpler the code, the better.
------ Requested example ------
I use the Salesforce platform, it has some changes in relation to html but I was able to adapt perfectly, without any problem.
<!--IMPORTAÇÕES NECESSÁRIAS-->
TODAS IMPORTAÇÕES SÃO ENCONTRADAS NO SITE DO COMPONENTE
https://www.travismclarke.com/tableexport/ -->
<apex:includeScript
`value="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" />
<apex:includeScript value="{!$Resource.xlsxcoremin}"/>
<apex:includeScript value="{!$Resource.Export2ExcelJS}"/>
<apex:includeScript value="{!$Resource.TableExportJS}"/>
<apex:includeScript value="{!$Resource.TableExport2JS}"/>
<apex:includeScript value="{!$Resource.FileSaverJS}"/>`
`<table id="tabela" style="width:100%">
<tr>
<th>CABEÇALHO</th>
</tr>
<tr>
<apex:repeat value="{!registro}" var="reg">
<td><apex:outputText value="{!reg.Name}"/></td>
<td><apex:outputText value="{!reg.Complemento__c}"/></td>
<td><apex:outputText value="{!reg.Data__c}"></apex:outputText></td>
<td><apex:outputText value="{!reg.Banco__c}"></apex:outputText></td>
</apex:repeat>
</tr>
</table>
<input id="clickMe" type="button" value="clickme" onclick="exibeOpcs();" />
`
`function exibeOpcs(){
$("#tabela").tableExport({
headings: true,
footers: true,
formats: ["txt", "xlsx"],
fileName: "Planilha",
});
}`
What have you tried to do? Want to export a
<table>
for.xlsl
?– Jorge B.
I will actually use another data component, but I tried everything already, using table, plain text and everything I found ahead. Any path that leads to the . xlsx will already help, no matter much the input component.
– Bruno
@Miguel, think that any simple <table> will be used. I haven’t finished the code because I don’t know how to do what I want yet.
– Bruno