Excel 工作簿和图表 API 概述Excel workbooks and charts API overview

Excel 是一个提高工作效率不可或缺的工具。Excel is an indispensable productivity tool. 所有行业和工作职能的用户都将其视为用于存储、跟踪和操作各类数据的工具。Users across all industries and job functions embrace it as a tool for storing, tracking, and manipulating all kinds of data. 从简单的任务跟踪和数据管理,到复杂的计算和专业报告,Excel 可用于处理各种各样的任务。It's used for everything from simple task tracking and data management, to complex calculations and professional reporting. 你可以使用 Microsoft Graph 中的 Excel REST API 扩展数据、计算、报告和仪表板的价值。You can use the Excel REST API in Microsoft Graph to extend the value of your data, calculations, reporting, and dashboards.

为什么与 Excel 集成?Why integrate with Excel?

你可以使用 Microsoft Graph 来让 Web 和移动应用程序读取和修改存储在 OneDrive、SharePoint 或其他支持的存储平台中的 Excel 工作簿。You can use Microsoft Graph to allow web and mobile applications to read and modify Excel workbooks stored in OneDrive, SharePoint, or other supported storage platforms.

执行计算Perform calculations

用户喜欢他们可以轻松地在 Excel 中执行深入而复杂的计算。Users love the ease with which they can perform deep and complex calculations within Excel. 现在,你可以使用 Excel 强大的计算引擎,并且可以立即得到结果。You can now access Excel’s powerful calculation engine with instant results. 例如,按揭贷款计算器通过简单的 API 调用(包括付款的本金、利率和付款次数)即可利用 Excel 中的 PMT 函数。For example, a mortgage calculator can take advantage of the PMT function from Excel by making a simple API call that includes principal, rate and number of payments. Excel 将进行所有的复杂计算,并立即返回每月付款。Excel does all the difficult work and returns the monthly payment instantly. 当前提供有 300 多个 Excel 工作表函数,你可以完全访问 Excel 目前支持的各种公式。With more than 300 Excel worksheet functions currently available, you have full access to the breadth of formulas supported by Excel today. 不需要反复重建复杂业务模型。Complex business models don’t need to be rebuilt repeatedly. 开发者可以对 Excel 编程以立即执行这些计算,并使用简单 API 调用检索这些结果。Developers can program Excel to perform those calculations instantly and retrieve the results with simple API calls.

生成报告并分析结果Generate reports and analyze results

Excel 是一款灵活的报告和分析工具,范围从简单的数据表到复杂的专业仪表板。Excel is a flexible reporting and analysis tool, from simple data tables to complex professional dashboards. 现在,我们为你提供了访问 Excel 报告功能的完整权限,使 Excel 成为 Office 365 中的一个在线报告服务。Today, we give you full access to all of Excel’s reporting features, making Excel an online reporting service within Office 365. 想象一下:用户目前创建和依赖的所有报告方案都拉入到一个自定义应用,以创建专业图表或智能分析大量数据,从而将 Excel 无缝融合到这些自定义的体验中。Imagine any of the reporting scenarios users create and rely on today pulled into a custom app to create professional charts or analyze large sets of data intelligently, seamlessly blending Excel into those customized experiences.

存储和跟踪数据Store and track data

Excel 还是一款出色的存储和跟踪数据的工具。Excel is also a great tool to store and track data. 如果信息存储在工作簿中,则与 Office 365 集成的任何应用都可以访问该数据。If your information is stored in a workbook, that data is available to any app that integrates with Office 365. 可以从自定义解决方案读取其内容,并且这些解决方案可以使用 Excel 来存储数据。Its contents are available to read from custom solutions, and those solutions can use Excel for data storage.

注意: Excel REST API 仅支持 Office Open XML 文件格式的工作簿(扩展名为 .xlsx 的文件)。Note: The Excel REST API supports only Office Open XML file formatted workbooks (files with the.xlsx extension). 不支持扩展名为 .xls 的工作簿。The .xls extension workbooks are not supported.

使用 Excel REST APIUsing the Excel REST API

你可以使用 Microsoft Graph 来让 Web 和移动应用程序读取和修改存储在 OneDrive、SharePoint 或其他支持的存储平台中的 Excel 工作簿。You can use Microsoft Graph to allow web and mobile applications to read and modify Excel workbooks stored in OneDrive, SharePoint, or other supported storage platforms. Workbook(或 Excel 文件)资源通过关系包含所有其他 Excel 资源。The Workbook (or Excel file) resource contains all the other Excel resources through relationships. 你可以通过标识文件在该 URL 中的位置,借助 Drive API 访问工作簿。You can access a workbook through the Drive API by identifying the location of the file in the URL. 例如:For example:

https://graph.microsoft.com/{version}/me/drive/items/{id}/workbook/

https://graph.microsoft.com/{version}/me/drive/root:/{item-path}:/workbook/

可以通过使用标准 REST API 访问一组 Excel 对象(例如表、区域或图表),以便对工作簿执行创建、读取、更新和删除 (CRUD) 操作。You can access a set of Excel objects (such as Table, Range, or Chart) by using standard REST APIs to perform create, read, update, and delete (CRUD) operations on the workbook.

API 参考API reference

在查找此服务的 API 参考?Looking for the API reference for this service?

后续步骤Next steps