Ewa.EwaControl オブジェクト

**適用対象:**apps for SharePoint | Excel Services | SharePoint Server 2013

[ Excel Services Web パーツ ページを表します。

Ewa.EwaControl

注釈

Ewa.EwaControlオブジェクトは、 Excel Services Web パーツを表します。Excel Services API、 Ewa.EwaControlオブジェクトを通じて API の他のすべてのオブジェクトにアクセスします。

Excel Services Web パーツの詳細については、 Excel Web AccessSharePoint Server 2010 SDK のドキュメントを参照してください。

次の例をExcel Services Web パーツへの参照を取得する方法を示します。コードの例をExcel Web Access Web パーツでSharePoint Server 2013で作業していることを前提としています。

<script type="text/javascript">
var ewa = null;

// Add event handler for onload event.
if (window.attachEvent) 
{ 
    window.attachEvent("onload", ewaOnPageLoad);    
} 
else 
{ 
    window.addEventListener("DOMContentLoaded", ewaOnPageLoad, false); 
}
// Add event handler for applicationReady event.
function ewaOnPageLoad()
{
    if (typeof (Ewa) != "undefined")
    {
Ewa.EwaControl.add_applicationReady(ewaApplicationReady);
    }
    else
    {
alert("Error - the EWA is not loaded.");
    }
    // Add your code here.
}

function ewaApplicationReady()
{
    // Get a reference to the Excel Services Web Part.
    ewa = Ewa.EwaControl.getInstances().getItem(0);

    // Add your code here.
}

// Add your code here.
    </script>

関連項目

概念

Ewa.EwaControl 方法