cancel
Showing results for 
Search instead for 
Did you mean: 

XLSX external library working fine in BAS but not working in Fiori Launchpad

tejaswikosanam
Explorer
0 Kudos
410

Hi, 

I am using xlsx.full.min.js file in a File upload project. The xlsx.full.min.js is included in a folder under webapp and referencing it correctly.

tejaswikosanam_0-1718304985561.png

When I run the file locally in SAP BAS it's working fine. But when I deployed and ran from Fiori Launchpad it's throwing error as XLSX.read is not a function.

tejaswikosanam_0-1718304501064.png

I tried  /* global XLSX:true */ at the top of the controller. But the issue still occurs.

 

Could you please suggest how do I resolve this issue.
View Entire Topic
sani2608
Explorer
0 Kudos

For me this works, I am not referring to the file in the controller, I can access XLSX globally.

"js": [  {    "uri": "libs/xlsx.js"   }   ],

I'm using this CDN -  https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.0/xlsx.js
I was using the CDN first, but later I copied the code locally.

tejaswikosanam
Explorer
0 Kudos

I tried this but it didn't work for me. Below solution worked for me:
https://community.sap.com/t5/technology-q-a/howto-use-3rd-party-lib-with-content-security-policy-omi...