本文演示了如何在 Excel Services 中访问和查看 REST 服务的架构的一个示例。 本文假定你已阅读 Excel Services REST API 的示例 URI。
注意
Excel Services REST API 适用于本地 SharePoint 和 SharePoint 2016。 对于Microsoft 365 教育版、商业和企业帐户,请使用属于 Microsoft Graph 终结点的 Excel REST API。
查看架构
在浏览器地址栏中,键入使用 URI 的 Atom XML 源的 URI,如下所示:
https://{{myserver}}/_vti_bin/ExcelRest.aspx/Docs/Documents/sampleWorkbook.xlsx/model/Ranges('Sheet1!A1|H3')?$format=atom
右键单击网页,然后选择“ 查看源”。
现在您应该看到如以下示例中所示的架构:
<?xml version="1.0" encoding="utf-8"?>
<entry xml:base="http://excel.live.com/REST"
xmlns:x="http://schemas.microsoft.com/office/2008/07/excelservices/rest"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservice"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns="http://www.w3.org/2005/Atom">
<title type="text">Sheet1!A1:H3</title>
<id>http://myserver/_vti_bin/ExcelRest.aspx/Docs/Documents/sampleWorkbook.xlsx/model/Ranges('Sheet1!A1%7CH3')</id>
<updated>2009-06-25T00:41:37Z</updated>
<author>
<name />
</author>
<link rel="self" href="http://myserver/_vti_bin/ExcelRest.aspx/Docs/Documents/sampleWorkbook.xlsx/model/Ranges('Sheet1!A1%7CH3')?$format=atom" title="Sheet1!A1:H3" />
<category term="ExcelServices.Range" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<content type="application/xml">
<x:range name="Sheet1!A1:H3">
<x:row>
<x:c>
<x:fv>Name </x:fv>
</x:c>
<x:c>
<x:fv>Name </x:fv>
</x:c>
<x:c>
<x:fv>Exchange </x:fv>
</x:c>
<x:c>
<x:fv>Symbol </x:fv>
</x:c>
<x:c>
<x:fv>Last Trade </x:fv>
</x:c>
<x:c/>
<x:c>
<x:fv>Change </x:fv>
</x:c>
<x:c>
<x:fv>Mkt Cap</x:fv>
</x:c>
</x:row>
<x:row>
<x:c>
<x:fv>Microsoft Corporation </x:fv>
</x:c>
<x:c>
<x:fv>Microsoft Corporation </x:fv>
</x:c>
<x:c>
<x:fv> </x:fv>
</x:c>
<x:c>
<x:fv>MSFT </x:fv>
</x:c>
<x:c>
<x:v>26.25</x:v>
<x:fv>26.25</x:fv>
</x:c>
<x:c/>
<x:c>
<x:fv>-0.23 (-0.87%) </x:fv>
</x:c>
<x:c>
<x:v>239670000000</x:v>
<x:fv> $239,670,000,000 </x:fv>
</x:c>
</x:row>
<x:row>
<x:c/>
<x:c/>
<x:c>
<x:fv> </x:fv>
</x:c>
<x:c/>
<x:c>
<x:v>15.58</x:v>
<x:fv>15.58</x:fv>
</x:c>
<x:c/>
<x:c>
<x:fv>-1.38 (-8.14%) </x:fv>
</x:c>
<x:c>
<x:v>21590000000</x:v>
<x:fv> $21,590,000,000 </x:fv>
</x:c>
</x:row>
</x:range>
</content>
</entry>