Skip to Content
0
May 24 at 07:56 PM

SAPUI5 sap.ui.export.Spreadsheet issue on Fiori Launchpad

141 Views

Hello experts,

I'm having a strange behavior with sap.ui.export.Spreadsheet control.

I use this control to export data from my app to a XLSX file. In my development workspace (I’m using VSCode as IDE with UI5 CLI) it works fine, I can see the Excel sheet with the correct data:

But, when I deploy it to the Abap repository and access the app via Fiori Launchpad, the export function doesn’t work well. It brings me only the headers:

This is the piece of code where I instantiate and use the Spreadsheet control:

I’m using Chrome to test both from VSCode and the deployed version in Fiori Launchpad.. When I check in the debug of devtools the content passed to the “dataSource” property of the settings object is correctly filled in both cases.

When I do the following test, hardcode the content of an array variable called aRows like this:

Then I pass this variable to the settings object:

Then it worked well, also in the Fiori Launchpad.

The strange thing is that the "hardcoded" array variable looks exactly the same as the binding object, when I check it in the debug.

I tried to create a clone of the binding object, because I thought it could be some reference being lost, but still didn’t work. It only works really with the hardcoded version of the array object.

I appreciate any help or input.

Thank you!

Attachments

xls-ok.png (54.3 kB)
xls-issue.png (20.6 kB)
code-1.png (17.8 kB)
code-2.png (21.1 kB)
code-3.png (8.9 kB)