Home>Support>How to show ribbon in embed excel using javascript

How to show ribbon in embed excel using javascript

Hi,

I am embedding excel using java script, every thing is working fine but i am not bale to show the ribbon in web page.
I am using excel online.

/*
* This code uses the Microsoft Office Excel Javascript object model to programmatically insert the
* Excel Web App into a div with id=myExcelDiv. The full API is documented at
* https://msdn.microsoft.com/en-US/library/hh315812.aspx. There you can find out how to programmatically get
* values from your Excel file and how to use the rest of the object model.
*/

// Use this file token to reference Test Excel.xlsx in Excel’s APIs
var fileToken = “SD805C50A3773687445562/t=0&s=0&v=!AMiiPoznCl_QT1U”;

// run the Excel load handler on page load
if (window.attachEvent) {
window.attachEvent(“onload”, loadEwaOnPageLoad);
} else {
window.addEventListener(“DOMContentLoaded”, loadEwaOnPageLoad, false);
}

function loadEwaOnPageLoad() {
var props = {
uiOptions: {
selectedCell: “‘Test Account’!A1”,
showParametersTaskPane: false
},
interactivityOptions: {
allowTypingAndFormulaEntry: false,
allowParameterModification: false,
allowSorting: false,
allowFiltering: false,
allowPivotTableInteractivity: false
}
};

Ewa.EwaControl.loadEwaAsync(fileToken, “myExcelDiv”, props, onEwaLoaded);
}

function onEwaLoaded(result) {
/*
* Add code here to interact with the embedded Excel web app.
* Find out more at https://msdn.microsoft.com/en-US/library/hh315812.aspx.
*/
}

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More