Excel Services REST API のためのサンプル URI

最終更新日: 2010年4月7日

適用対象: SharePoint Server 2010

このトピックでは、Excel Services の REST (Representational State Transfer) サービス コマンドのサンプル URI の一覧を示します。

Excel Services の REST コマンドのサンプル URI

以下の例では、各 URI が、sampleWorkbook.xlsx という名前のブックを参照します。

  • sampleWorkbook.xlsx ファイルには、名前付き範囲とグラフが含まれます。

  • sampleWorkbook.xlsx ファイルは、信頼できる SharePoint ドキュメント ライブラリに保存されます。この例では、sampleWorkbook.xlsx の場所へのパスは次のとおりです。

    http://<ServerName>/Docs/Documents/sampleWorkbook.xlsx
    

サンプル URI

Excel Services の REST サービスの .aspx ページは次のとおりです。

http://<ServerName>/_vti_bin/ExcelRest.aspx

Excel Services の REST サービスを使用して sampleWorkbook.xlsx ブックにアクセスするための URI の例を次に示します。

  • ブックの最上位のモデル (現在のビルドでは範囲とグラフのみ)。

    http://<ServerName>/_vti_bin/ExcelRest.aspx/Docs/Documents/sampleWorkbook.xlsx/model
    
  • 完全なブックを取得する。

    http://<ServerName>/_vti_bin/ExcelRest.aspx/Docs/Documents/sampleWorkbook.xlsx/model?$format=workbook
    
  • 範囲を返す (既定の html)。以下の 2 つの URI の例は同等。

    http://<ServerName>/_vti_bin/ExcelRest.aspx/Docs/Documents/sampleWorkbook.xlsx/model/Ranges('Sheet1!A1|G5')
    
    http://<ServerName>/_vti_bin/ExcelRest.aspx/Docs/Documents/sampleWorkbook.xlsx/model/Ranges('Sheet1!A1|G5')?$format=html
    
  • 名前付き範囲を取得する。

    http://<ServerName>/_vti_bin/ExcelRest.aspx/Docs/Documents/sampleWorkbook.xlsx/model/Ranges('nameOfTheNamedRange')
    
  • Atom XML フィードを返す。

    http://<ServerName>/_vti_bin/ExcelRest.aspx/Docs/Documents/sampleWorkbook.xlsx/model?$format=atom
    
  • セルを設定して返す。

    http://<ServerName>/_vti_bin/ExcelRest.aspx/Docs/Documents/sampleWorkbook.xlsx/model/Ranges('Sheet1!A1|G5')?Ranges('Sheet1!C3')=demo
    
  • グラフを取得する。

    http://<ServerName>/_vti_bin/ExcelRest.aspx/Docs/Documents/sampleWorkbook.xlsx/model/Charts('Chart 1')
    
  • 値を設定し、グラフを取得する。

    http://<ServerName>/_vti_bin/ExcelRest.aspx/Docs/Documents/sampleWorkbook.xlsx/model/Charts('Chart%201')?Ranges('Sheet1!A1')=5.5