高頓網(wǎng)校友情提示,*7金華會(huì)計(jì)繼續(xù)教育網(wǎng)上總結(jié)信息Excel2007新知-Excel服務(wù)VI—用Excel Web Services創(chuàng)建應(yīng)用程序等內(nèi)容公布如下:
  Excel Services part 6: Building applications with Excel Web Services
  Excel Services(第6部分):用Excel Web Services創(chuàng)建應(yīng)用程序

  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 中的方案時(shí),我提到過”在用戶自定義程序中重復(fù)利用Excel電子表格的邏輯封裝”——可升級和管理通過網(wǎng)絡(luò)服務(wù)器訪問電子表格和存儲信息服務(wù)器端。我在上面的一些文章中就這個(gè)主題作過詳細(xì)的介紹。今天,我將介紹“Excel Web Services”,接下來的文章展示如何用網(wǎng)絡(luò)服務(wù)器開發(fā)小的應(yīng)用程序示例。  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架構(gòu) 。Excel Calculation Service是Excel Services的”引擎”,是裝載和計(jì)算電子表格的組件。在上篇文章中介紹了”在瀏覽器中與電子表格相交互”, Excel Calculation Service裝載和計(jì)算電子表格,并且不需要Excel Web Access(配置在瀏覽器中生成HTML的組件)。這篇文章接下來介紹開發(fā)者不需要Excel Web Access的配合也能運(yùn)用Excel Calculation Service。具體地講,我們在Excel Calculation Service中已經(jīng)直接創(chuàng)建了一個(gè)網(wǎng)絡(luò)服務(wù)器API,以便于開發(fā)者能在他們自己的應(yīng)用程序中直接調(diào)用網(wǎng)絡(luò)服務(wù)器端的電子表格。例如,開發(fā)者能夠?qū)懹脕泶蜷_服務(wù)器上的電子表格的代碼,設(shè)置單元格和區(qū)域?yàn)橹付ㄖ?,控制外部?shù)據(jù)更新和工作薄計(jì)算,并且最后從已經(jīng)過計(jì)算的工作簿中取回?cái)?shù)值(或取回整個(gè)工作薄)。下面列舉了一些更詳細(xì)的例子。  What sorts of things are these web services good for
  這些網(wǎng)絡(luò)服務(wù)有哪些功能?

   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能處理一些有趣的情況。下面有兩個(gè)經(jīng)常從我們的客戶那里聽到的例子。
  在服務(wù)器應(yīng)用程序中的電子表格上運(yùn)用邏輯——不需要使用”傳統(tǒng)的”方法,即用編程語言重新編
  寫這些邏輯代碼。在這種情況下,創(chuàng)建電子表格的商務(wù)專家能在Excel中維護(hù)這個(gè)模型;管理員
  能在服務(wù)器上使用合適的用戶權(quán)限設(shè)置來保護(hù)模型;開發(fā)者能調(diào)用Excel Web Services在用戶
  解決方案部分加入電子表格邏輯。在這方面的另一個(gè)變化是為基于Excel服務(wù)器應(yīng)用程序提供了
  自定義用戶界面,該服務(wù)器應(yīng)用程序使用Excel Web Services與服務(wù)器端計(jì)算進(jìn)程進(jìn)行交互。
   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.
  在服務(wù)器中自動(dòng)更新電子表格。這項(xiàng)功能相當(dāng)好地組合在全新Open XML文件格式中,可非常簡單地自動(dòng)編程完成從稿紙或模板創(chuàng)建一個(gè)Excel文件的任務(wù)。一旦創(chuàng)建了這個(gè)新文件,就經(jīng)常需要計(jì)算它——例如,如果有需要更新的外部數(shù)據(jù),開發(fā)者可以直接寫代碼去指令Excel Web Services完成所有這些工作,然后取回這個(gè)已經(jīng)過計(jì)算的文件副本并存儲在服務(wù)器上,或者將它傳送到另一個(gè)目標(biāo)上。  What specifically can the web service do
  網(wǎng)絡(luò)服務(wù)器具體處理什么工作?  
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進(jìn)行會(huì)話,設(shè)置單元格和區(qū)域的值,處理工作薄,獲得計(jì)算結(jié)果或整個(gè)工作薄并反饋到你的應(yīng)用程序。
  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:獲取所安裝的網(wǎng)絡(luò)服務(wù)器API架構(gòu)的版本字符串。
   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:打開服務(wù)器端計(jì)算會(huì)話。這個(gè)方法返回工作薄文件路徑和一些其它參數(shù),并返回一個(gè)服務(wù)器會(huì)話ID。
   GetSessionInformation: Get a few properties of the server session, primarily the language context of the session.
   GetSessionInformation:獲取一些服務(wù)器會(huì)話屬性,主要是會(huì)話語言文本。
   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:對工作薄中某一工作表上的單元格設(shè)置值。有兩種方法:一種使用單元格地址(如”B52”)或命名區(qū)域(如“Interest”);另一種使用整數(shù)坐標(biāo)值,有些情況下使用這種方法是更方便的(特別是當(dāng)你在代碼中有索引號并且想使用它們引用工作表時(shí))。
 
     
  掃一掃微信,學(xué)習(xí)實(shí)務(wù)技巧
   
  高頓網(wǎng)校特別提醒:已經(jīng)報(bào)名2014年財(cái)會(huì)考試的考生可按照復(fù)習(xí)計(jì)劃有效進(jìn)行!另外,高頓網(wǎng)校2014年財(cái)會(huì)考試高清課程已經(jīng)開通,通過針對性地講解、訓(xùn)練、答疑、模考,對學(xué)習(xí)過程進(jìn)行全程跟蹤、分析、指導(dǎo),可以幫助考生全面提升備考效果。