Skip to Content

Display Excel Sheet in UI5 Screen.

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Dec 17, 2016 at 01:01 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 17, 2016 at 02:02 PM
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.