cancel
Showing results for 
Search instead for 
Did you mean: 

Export to native excel (no csv) from HCP

Former Member
0 Kudos

Hello Experts,

We are using HCP to create a Java application with JPA Persistence connection and UI5 views. We need to make an export to Excel from an SAPUI5 odata model, but the only type of export I can find is manually building a CSV file. I found the below code searching for a native way but it seems this only works with Portal because I always get an error saying "Content type 'xlsx' is not supported.".

var oModel = sap.ui.getCore().byId("table-details-report").getModel();

var serviceURL = oModel.sServiceUrl + "/TABLE?$format=xlsx";

var encodeURL = encodeURI(serviceURL);

sap.m.URLHelper.redirect(encodeURL,true);

Is there a way to export the data on the odata model in HCP as a native Excel file? Our main concern is that we are exporting some free text fields which could contain commas and other special characters like tab, so that's why we wanted to use a native export.

Accepted Solutions (0)

Answers (1)

Answers (1)

kenny_scott
Contributor
0 Kudos

Hi Franklyn,

if you can't use csv

Using Data Binding for Data Export

then you could define your own export type, i.e,,


Developing UI5 Controls in JavaScript

Regards

Kenny