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
353

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
rahullohia
Product and Topic Expert
Product and Topic Expert

When you run this application in FLP, can you check the network tab in developer tools and search for this file? Also, have you specified this in the manifest.json under resources?

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

 

tejaswikosanam
Explorer
0 Kudos
Hi Rahul, I have tried this option but it didn't resolve the issue. I even tried using sap.ui.loader.config. Even this one couldn't resolve the issue. I am not able to see that file in Network tab at all. Do I need to follow different procedure for external libraries in BAS and Launchpad?
sani2608
Explorer
0 Kudos

.

sani2608
Explorer
0 Kudos
For me this works without any issue, I'm not even referring the path in the on top.
tejaswikosanam
Explorer
0 Kudos
Hi Sani, you installed them using npm or how are handling this?
sani2608
Explorer
0 Kudos
I have done in same way what you are sharing in screenshot, the only difference is that I did not import it in sap.ui.define(), it just worked.