cancel
Showing results for 
Search instead for 
Did you mean: 

sap/ui/export/Spreadsheet.js 404 not found

tezk
Participant
0 Kudos
2,148

Hi,

I am trying to export sap.m.table data to the .xlsx file format. So, I am using sap.ui.export.Spreadsheet. But in the console, I see the error message: Uncaught Error: "Failed to load 'sap/ui/export/Spreadsheet.js' from - 404 not found". It is available since version 1.50. I have checked my sapui5 version(sap.ui.version) also and it is 1.60.2. So it will be supported.

Could you please let me know how to resolve the issue.

0 Kudos

Hi,

Load the library explicitly , by executing sap.ui.require syntax or add it as a dependent in controller.

Thanks,

Ajay.

ramakrishnappa
Active Contributor

Hi,

Are you running your app in launchpad or on local IDE? Because the ui5 version might be different than the local IDE and on your server side.

Try to change the source of library in index.html as below. Check if it works.

src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"

Regards,

Rama

tezk
Participant

Hi Ajay,

I did what you have suggested: jQuery.sap.require("sap.ui.export.Spreadsheet");

But it didn't work. Should I do anything else??

Thanks and Regards,

Teja.

tezk
Participant
0 Kudos

Hi Ramakrishna,

Actually, we are using(integrated) sapui5 code in personas. Here, we are loading libraries and all. URL is like below

src="/sap/public/bc/ui5_ui5/1/resources/sap-ui-cachebuster/sap-ui-core.js".

I have tried to change version number just beside ui5_ui5 to 1.60.2. But there is no result.

Thanks and Regards,

Teja.

View Entire Topic
danilarrosa
Associate
Associate
0 Kudos

For everyone who face this problem running some QUnit testing, please ensure to modify the src path in opaTest.qunit.html and unitTests.qunit.html:

 

<script id="sap-ui-bootstrap" src="xxxxx"

 

In src you must put the standar sapui5 url"https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"

Regards,

Daniel.