I am working on export into excel sheet requirement using 'alasql'.
My Javasript object to be given as input to alasql is
0:
ContactEmail: "email1@example.com"
ContactName: "abcd"
CustomerName: "defg"
SubdomainName: "adasdasd"
1:
ContactEmail: "email2@example.com"
ContactName: "abcd"
CustomerName: "defg"
SubdomainName: "adasdasd"
2:
ContactEmail: "email3@example.com"
ContactName: "abcd"
CustomerName: "defg"
SubdomainName: "adasdasd"
below is my alasql script to export into excel sheet
var sheet_name = 'clients.xlsx'
alasql('SELECT * INTO XLSX("'+sheet_name+'",{headers:true}) FROM ?', arrayToExport);
My probem here is, it is exporting only the first key that is '0' & '1' key values and headers like below:
0 1
CustomerName name1
ContactName contact1
ContactEmail email1@example.com
SubdomainName adasdasd
JS Includes:
<script src="{{ asset(auto_version('public/js/alasql.min.js')) }}"></script>
<script src="{{ asset(auto_version('public/js/alasql_xlsx.js')) }}"></script>
Can anyone please assist me in this. Thanks.