Skip to Content
0

Display Excel Sheet in UI5 Screen.

Dec 16, 2016 at 08:56 AM

157

avatar image

Hello Friends,

I need to display excel sheet in UI5 Screen also should be downloadable if user needs.

I followed below blog:-

https://blogs.sap.com/2014/04/24/download-sapui5-table-as-excel-generated-in-abap-backend-system/

My Code:-

var html = new sap.ui.core.HTML();
var oPanel = this.getView().byId("panel");
var sRead = "/ety_so_reportSet(IM_VBELN='" + doc_number + "')//$value";
oPanel.destroyContent();
oModel.read(sRead, null, null, true, function(oData, oResponse) {
var sURI = oResponse.requestUri;

html.setContent("<iframe src=" + sURI + " height='750' width='1600' type='text/html'></iframe>");
//html.setContent("<object data=" + sURI + " height='750' width='1600'></object>");
// html.setContent("<embed src=" + sURI + " height='750' width='1600'></embed>");

oPanel.addContent(html);

now file is downloading. its not open in UI5 screen. How to display excel sheet in UI5 Screen?

Regards

Vijay

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Jun Wu Dec 17, 2016 at 02:02 PM
0
Share
10 |10000 characters needed characters left characters exceeded
Mahesh kumar palavalli Dec 17, 2016 at 01:01 PM
0

You have to use the SAP.ui.table or sap.m.table to display the data... I don't think SAP ui5 has a control to show the excel in the UI5 app

Share
10 |10000 characters needed characters left characters exceeded