金华会计继续教育网:Excel2007新知-Excel服务VI—用Excel Web Services创建应用程序
来源:
高顿网校
2014-06-27
高顿网校友情提示,*7金华会计继续教育网上总结信息Excel2007新知-Excel服务VI—用Excel Web Services创建应用程序等内容公布如下:
Excel Services part 6: Building applications with Excel Web Services
Excel Services(第6部分):用Excel Web Services创建应用程序
While talking about scenarios for Excel Services, I mentioned “Reusing the logic encapsulated in Excel spreadsheets in custom applications” – which means accessing spreadsheets and their contents server-side via web services in a way that’s scalable and manageable. I would like to elaborate on this topic over a couple of posts. Today, I will introduce “Excel Web Services”; in a follow-up post I will show how to develop a small sample application using said web services.
在介绍Excel Services 中的方案时,我提到过”在用户自定义程序中重复利用Excel电子表格的逻辑封装”——可升级和管理通过网络服务器访问电子表格和存储信息服务器端。我在上面的一些文章中就这个主题作过详细的介绍。今天,我将介绍“Excel Web Services”,接下来的文章展示如何用网络服务器开发小的应用程序示例。 In a nutshell…
概述 Let’s briefly revisit Excel Services’ architecture. The Excel Calculation Service is the “engine” of Excel Services; it is the component that loads and calculates spreadsheets. In the “interact with the spreadsheet in your browser” scenarios covered in previous posts, Excel Calculation Services loads and calculates a spreadsheet and then hands it off to the Excel Web Access, which is the component that produces the HTML that ends up in your browser. The point of today’s post (and the post that will follow) is that developers can also use Excel Calculation Services without needing to interact with the Excel Web Access. Specifically, we have built a web service API directly on top of the Excel Calculation Services so that developers can call server-side spreadsheets directly from their own applications. For example, developers could write code that opens a spreadsheet on a server, sets cells and ranges to specific values, controls external data refresh and workbook calculation, and finally retrieves values from the calculated workbook (or retrieves the workbook in its entirety). Let’s look at some more specific examples.
先简单地回顾一下Excel Services架构 。Excel Calculation Service是Excel Services的”引擎”,是装载和计算电子表格的组件。在上篇文章中介绍了”在浏览器中与电子表格相交互”, Excel Calculation Service装载和计算电子表格,并且不需要Excel Web Access(配置在浏览器中生成HTML的组件)。这篇文章接下来介绍开发者不需要Excel Web Access的配合也能运用Excel Calculation Service。具体地讲,我们在Excel Calculation Service中已经直接创建了一个网络服务器API,以便于开发者能在他们自己的应用程序中直接调用网络服务器端的电子表格。例如,开发者能够写用来打开服务器上的电子表格的代码,设置单元格和区域为指定值,控制外部数据更新和工作薄计算,并且最后从已经过计算的工作簿中取回数值(或取回整个工作薄)。下面列举了一些更详细的例子。 What sorts of things are these web services good for
这些网络服务有哪些功能?
Excel Web Services enables many interesting scenarios. Here are two examples that we have heard repeatedly from our customers.
Using the logic in Excel spreadsheets in a server application – without the “traditional” need to recode this logic in a programming language. In this scenario, the business expert who authored the spreadsheet can keep maintaining the model in Excel; the administrator can protect that model on the server using the appropriate set of users, roles, permissions, and a firewall; and the developer can call Excel Web Services to incorporate the logic in the spreadsheet into the rest of a custom solution. Another variation on this would be providing custom UI to Excel-based server applications which use Excel Web Services to interact with a server-side calculation session.
Excel Web Service能处理一些有趣的情况。下面有两个经常从我们的客户那里听到的例子。
在服务器应用程序中的电子表格上运用逻辑——不需要使用”传统的”方法,即用编程语言重新编
写这些逻辑代码。在这种情况下,创建电子表格的商务专家能在Excel中维护这个模型;管理员
能在服务器上使用合适的用户权限设置来保护模型;开发者能调用Excel Web Services在用户
解决方案部分加入电子表格逻辑。在这方面的另一个变化是为基于Excel服务器应用程序提供了
自定义用户界面,该服务器应用程序使用Excel Web Services与服务器端计算进程进行交互。
Automating spreadsheet updates on servers. This works especially well in combination with the new Open XML file format, which greatly simplifies the task of programmatically creating an Excel file from scratch or using a template. Once the new file has been created, it often needs to be calculated – for example, if there are external data feeds that need to be updated. It is straightforward for developers to write code to use Excel Web Services to do all of this, then retrieve an up-to-date copy of the calculated file and save it back to the server, or deliver it to any other destination.
在服务器中自动更新电子表格。这项功能相当好地组合在全新Open XML文件格式中,可非常简单地自动编程完成从稿纸或模板创建一个Excel文件的任务。一旦创建了这个新文件,就经常需要计算它——例如,如果有需要更新的外部数据,开发者可以直接写代码去指令Excel Web Services完成所有这些工作,然后取回这个已经过计算的文件副本并存储在服务器上,或者将它传送到另一个目标上。 What specifically can the web service do
网络服务器具体处理什么工作? Here is the summary: your code can start a session with the Excel Calculation Service, set values into cells and ranges, process the workbook, and get calculated values or the entire workbook back into your application.
概括地讲:你的代码能够开始与Excel Calculation Service进行会话,设置单元格和区域的值,处理工作薄,获得计算结果或整个工作薄并反馈到你的应用程序。
Here is the longer answer… a full list of what your code can do with Excel Web Services:
下面是Excel Web Services代码的全部列表:
GetApiVersion: Get a version string of the installed web service API build.
GetApiVersion:获取所安装的网络服务器API架构的版本字符串。
sessionId = OpenWorkbook: Open a server-side calculation session. The method takes a workbook file path, and a few other arguments, and returns a sessionId.
sessionId = OpenWorkbook:打开服务器端计算会话。这个方法返回工作薄文件路径和一些其它参数,并返回一个服务器会话ID。
GetSessionInformation: Get a few properties of the server session, primarily the language context of the session.
GetSessionInformation:获取一些服务器会话属性,主要是会话语言文本。
SetCell: Set a value into a cell on one of the workbook’s sheets. Two flavors of this method exist: one takes a cell address (e.g “B52”) or a named range (e.g. “Interest”), and the other accepts integer coordinates, for cases where it is more convenient for your code to use them (typically when you have indexes in the code and want to use them to index the sheet).
SetCell:对工作薄中某一工作表上的单元格设置值。有两种方法:一种使用单元格地址(如”B52”)或命名区域(如“Interest”);另一种使用整数坐标值,有些情况下使用这种方法是更方便的(特别是当你在代码中有索引号并且想使用它们引用工作表时)。
Excel Services(第6部分):用Excel Web Services创建应用程序
While talking about scenarios for Excel Services, I mentioned “Reusing the logic encapsulated in Excel spreadsheets in custom applications” – which means accessing spreadsheets and their contents server-side via web services in a way that’s scalable and manageable. I would like to elaborate on this topic over a couple of posts. Today, I will introduce “Excel Web Services”; in a follow-up post I will show how to develop a small sample application using said web services.
在介绍Excel Services 中的方案时,我提到过”在用户自定义程序中重复利用Excel电子表格的逻辑封装”——可升级和管理通过网络服务器访问电子表格和存储信息服务器端。我在上面的一些文章中就这个主题作过详细的介绍。今天,我将介绍“Excel Web Services”,接下来的文章展示如何用网络服务器开发小的应用程序示例。 In a nutshell…
概述 Let’s briefly revisit Excel Services’ architecture. The Excel Calculation Service is the “engine” of Excel Services; it is the component that loads and calculates spreadsheets. In the “interact with the spreadsheet in your browser” scenarios covered in previous posts, Excel Calculation Services loads and calculates a spreadsheet and then hands it off to the Excel Web Access, which is the component that produces the HTML that ends up in your browser. The point of today’s post (and the post that will follow) is that developers can also use Excel Calculation Services without needing to interact with the Excel Web Access. Specifically, we have built a web service API directly on top of the Excel Calculation Services so that developers can call server-side spreadsheets directly from their own applications. For example, developers could write code that opens a spreadsheet on a server, sets cells and ranges to specific values, controls external data refresh and workbook calculation, and finally retrieves values from the calculated workbook (or retrieves the workbook in its entirety). Let’s look at some more specific examples.
先简单地回顾一下Excel Services架构 。Excel Calculation Service是Excel Services的”引擎”,是装载和计算电子表格的组件。在上篇文章中介绍了”在浏览器中与电子表格相交互”, Excel Calculation Service装载和计算电子表格,并且不需要Excel Web Access(配置在浏览器中生成HTML的组件)。这篇文章接下来介绍开发者不需要Excel Web Access的配合也能运用Excel Calculation Service。具体地讲,我们在Excel Calculation Service中已经直接创建了一个网络服务器API,以便于开发者能在他们自己的应用程序中直接调用网络服务器端的电子表格。例如,开发者能够写用来打开服务器上的电子表格的代码,设置单元格和区域为指定值,控制外部数据更新和工作薄计算,并且最后从已经过计算的工作簿中取回数值(或取回整个工作薄)。下面列举了一些更详细的例子。 What sorts of things are these web services good for
这些网络服务有哪些功能?
Excel Web Services enables many interesting scenarios. Here are two examples that we have heard repeatedly from our customers.
Using the logic in Excel spreadsheets in a server application – without the “traditional” need to recode this logic in a programming language. In this scenario, the business expert who authored the spreadsheet can keep maintaining the model in Excel; the administrator can protect that model on the server using the appropriate set of users, roles, permissions, and a firewall; and the developer can call Excel Web Services to incorporate the logic in the spreadsheet into the rest of a custom solution. Another variation on this would be providing custom UI to Excel-based server applications which use Excel Web Services to interact with a server-side calculation session.
Excel Web Service能处理一些有趣的情况。下面有两个经常从我们的客户那里听到的例子。
在服务器应用程序中的电子表格上运用逻辑——不需要使用”传统的”方法,即用编程语言重新编
写这些逻辑代码。在这种情况下,创建电子表格的商务专家能在Excel中维护这个模型;管理员
能在服务器上使用合适的用户权限设置来保护模型;开发者能调用Excel Web Services在用户
解决方案部分加入电子表格逻辑。在这方面的另一个变化是为基于Excel服务器应用程序提供了
自定义用户界面,该服务器应用程序使用Excel Web Services与服务器端计算进程进行交互。
Automating spreadsheet updates on servers. This works especially well in combination with the new Open XML file format, which greatly simplifies the task of programmatically creating an Excel file from scratch or using a template. Once the new file has been created, it often needs to be calculated – for example, if there are external data feeds that need to be updated. It is straightforward for developers to write code to use Excel Web Services to do all of this, then retrieve an up-to-date copy of the calculated file and save it back to the server, or deliver it to any other destination.
在服务器中自动更新电子表格。这项功能相当好地组合在全新Open XML文件格式中,可非常简单地自动编程完成从稿纸或模板创建一个Excel文件的任务。一旦创建了这个新文件,就经常需要计算它——例如,如果有需要更新的外部数据,开发者可以直接写代码去指令Excel Web Services完成所有这些工作,然后取回这个已经过计算的文件副本并存储在服务器上,或者将它传送到另一个目标上。 What specifically can the web service do
网络服务器具体处理什么工作? Here is the summary: your code can start a session with the Excel Calculation Service, set values into cells and ranges, process the workbook, and get calculated values or the entire workbook back into your application.
概括地讲:你的代码能够开始与Excel Calculation Service进行会话,设置单元格和区域的值,处理工作薄,获得计算结果或整个工作薄并反馈到你的应用程序。
Here is the longer answer… a full list of what your code can do with Excel Web Services:
下面是Excel Web Services代码的全部列表:
GetApiVersion: Get a version string of the installed web service API build.
GetApiVersion:获取所安装的网络服务器API架构的版本字符串。
sessionId = OpenWorkbook: Open a server-side calculation session. The method takes a workbook file path, and a few other arguments, and returns a sessionId.
sessionId = OpenWorkbook:打开服务器端计算会话。这个方法返回工作薄文件路径和一些其它参数,并返回一个服务器会话ID。
GetSessionInformation: Get a few properties of the server session, primarily the language context of the session.
GetSessionInformation:获取一些服务器会话属性,主要是会话语言文本。
SetCell: Set a value into a cell on one of the workbook’s sheets. Two flavors of this method exist: one takes a cell address (e.g “B52”) or a named range (e.g. “Interest”), and the other accepts integer coordinates, for cases where it is more convenient for your code to use them (typically when you have indexes in the code and want to use them to index the sheet).
SetCell:对工作薄中某一工作表上的单元格设置值。有两种方法:一种使用单元格地址(如”B52”)或命名区域(如“Interest”);另一种使用整数坐标值,有些情况下使用这种方法是更方便的(特别是当你在代码中有索引号并且想使用它们引用工作表时)。
扫一扫微信,学习实务技巧
版权声明:本条内容自发布之日起,有效期为一个月。凡本网站注明“来源高顿教育”或“来源高顿网校”或“来源高顿”的所有作品,均为本网站合法拥有版权的作品,未经本网站授权,任何媒体、网站、个人不得转载、链接、转帖或以其他方式使用。
经本网站合法授权的,应在授权范围内使用,且使用时必须注明“来源高顿教育”或“来源高顿网校”或“来源高顿”,并不得对作品中出现的“高顿”字样进行删减、替换等。违反上述声明者,本网站将依法追究其法律责任。
本网站的部分资料转载自互联网,均尽力标明作者和出处。本网站转载的目的在于传递更多信息,并不意味着赞同其观点或证实其描述,本网站不对其真实性负责。
如您认为本网站刊载作品涉及版权等问题,请与本网站联系(邮箱fawu@gaodun.com,电话:021-31587497),本网站核实确认后会尽快予以处理。
严选名师 全流程服务
其他人还搜了
热门推荐
-
学好会计电算化的4个小技巧 2022-01-04
-
会计新手必备:金蝶财会软件使用技巧 2018-07-06
-
会计实用工具:数字大写转换(数字大写) 2017-01-19
-
最实用的会计工具:数字大写转换 2016-08-18
-
会计人必须掌握的50个常用工具 2016-08-03
-
99%的会计需要用到的30个万能公式! 2016-08-03
-
财会工作必备EXCEL 技巧,一看就知道! 2016-08-03
-
国内会计科目的词汇:成本类科目 2016-06-27
-
不同用途财政资金安排,三种税务方案巧选择 2016-06-21
-
纳税人、增值税专用发票领购簿变更程序 2016-06-17
-
填写现金支票的有哪些具体的步骤与方法 2016-06-16
-
教你学会建账流程 2016-06-15
-
UFO报表的有哪几个状态 2016-06-15
-
用友U8出纳管理步骤 2016-06-15
-
运输方式常用表达 2016-06-07
-
运输方式常用表达 2016-06-07
-
工资、薪金所得税率表 2016-06-02
-
关税复合税率表 2016-06-02
-
企业所得税税率表 2016-06-01
-
契税的税率 2016-06-01
-
企业发票专用章事宜如何办理 2016-06-01
-
辅导期纳税人取得的发票何时抵扣 2016-06-01
-
土地使用费标准 2016-05-31
-
支票填写的注意事项 2016-05-27
-
跨境人民币可以怎么用 2016-05-18
-
50套会计工作者常用公式 2016-05-18
-
人民币大写金额转换工具 2016-04-27
-
股份制企业经常会用到的会计公式 2016-03-02
-
如何从会计报表中发现税收风险 2016-02-14
-
"三证合一"后,企业注销有涉税疑点咋办? 2016-02-14