• Yogesh Rashinkar
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
In below code i am creating XLS file using lightning javascript controller but it is ending up with creating an xls file how i can create XLSX file?? in the same way if i create xlsx file, file is not opening..


var hiddenElement = document.createElement('a');
        hiddenElement.href = 'data:application/vnd.ms-excel;charset=utf-8' + ',' + encodeURIComponent(csv);
        hiddenElement.download = 'Report.xls'; 
        hiddenElement.style="border: 1.5pt"; 
        document.body.appendChild(hiddenElement); // Required for FireFox browser
        hiddenElement.click();