cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

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

tezk
Participant
0 Kudos
3,139

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

amirkehtarian
Explorer

Hi, to include sap.ui.export in your project, you need to update your ui5.yaml file. Add the library as shown below:

framework:

  name: SAPUI5

  version: "1.108.0"

  libraries:

    - name: sap.m

    - name: sap.f

    - name: sap.uxap

    - name: sap.ui.core

    - name: sap.ui.table

    - name: themelib_sap_fiori_3

    - name: themelib_sap_horizon

    - name: sap.ui.export

After making this change, restart your project by running:

npm start

This is necessary because any changes made to ui5.yaml require the project to be restarted to take effect.

you can add the library directly in ui5.yaml or using the terminal:

ui5 add sap.ui.export

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

Aison
Participant
0 Kudos

Hi,

I am not sure how you got this error. For me, when I try to preview the application in the launchpad mode. I solved it by changing the src. You need to change the src in the /test/flpSandbox.html, not the index.html. Change the src from ../resources/sap-ui-core.js to https://sapui5.hana.ondemand.com/resources/sap-ui-core.js

Hope you have solved it.