0

I have a functionality where data exported into excel document and it is implemented using JS-XLSX java library on Aura component and it is called VF page using LightningOut. It is working great on Classic but failing on Lightning Experience with below exception:

Not allowed to load local resource: blob:

Below is my implementation:

  1. JS-XLSX added to Static Resource
  2. Created Aura component
   generateXlsx : function() {
       console.log('I am in generateXlsx');
       const book = XLSX.utils.book_new();
       const sheet = XLSX.utils.aoa_to_sheet([
           ["a", "b", "c"],
           [1, 2, 3]
       ]);

       console.log('book==>', book);
       console.log('sheet==>', sheet);

       XLSX.utils.book_append_sheet(book, sheet, "test");


  XLSX.writeFile(book, "test-writeFile.xlsx", {compression:true});
       }

Right now it is opening a black window but found "Not allowed to load local resource: blob:" message on console logs.

Appreciate your help.

  • Are you importing FileSaver.js? – Jonathan Arias Sep 17 '19 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.