译者:fanjy 来源:http://blogs.msdn.com/excel
发表于:2006年7月7日
Excel services part 5: all about “interactivity”
Excel services (第5部分):介绍“交互”
Now that I have discussed publishing spreadsheets to Excel Services, let’s review how users can “interact” with spreadsheets that Excel Services has generated. To start, I want to explain what we mean by “interact” because it is anther development-team term that may not be clear to everyone reading this article.
到目前为止,我已经讲述了将电子表格发布到Excel Services上的方法,现在来介绍用户如何与Excel Services上的电子表格交互。首先,我想解释一下”交互”的含义,因为这是另一个开发团队的项目,读这篇文章的人可能对此不太清楚。
When we set about building Excel Services, we wanted to provide a richer experience than simply displaying a static spreadsheet in a browser. For example, we wanted users to be able to be able to change sorts and filters to better understand data they were looking at without leaving the context of the browser. We wanted users to be able to adjust PivotTables to see exactly they data they wanted to see in order to make better business decisions, again without leaving the context of the browser. We wanted users to be able to set parameters to perform what-if analysis, again from within their browser. We call all these sorts of things “interactivity”, since they involve the user taking actions that change the spreadsheet the user is working with, but do so without leaving the context of the browser.
当我们着手建立Excel Services时,我们希望提供更丰富的用户体验而不是简单地在浏览器中显示静态的电子表格。例如,我们希望用户不必离开浏览器页面就能变换排序和筛选来更好地理解他们正在查看的数据;能调整数据透视表以确切地看到他们想要的数据以便于做更好的商业决策;在浏览器页面就能设置参数来执行假设分析。上述这些都称作”交互”,即用户不须离开浏览器页面就能处理电子表格。
Specifically, our goals in this area are to allow users to:
具体地讲,我们的目标是允许用户能做如下操作:
• view spreadsheets in a browser
• 在浏览器中查看电子表格
• navigate around those spreadsheets
• 在那些电子表格中切换
• perform further exploration of the data in those spreadsheets
• 在(浏览器的)电子表格对数据进行进一步的处理
• change parameters to facilitate what-if analysis in said spreadsheets
• 在上述电子表格中变化参数便于进行假设分析
We did not have a goal to enable full-blown authoring of spreadsheets in a browser – to author spreadsheets, users will need Excel 12. Also, we did not have time to enable every feature in Excel 12 in the browser, so we focused on features based on the four goals outlined above. Finally, it is worth noting that if the user has permission, they can always press one button to open the spreadsheet in Excel 12, and they can then do anything they want.
我们并不打算允许在浏览器中能够完全编辑电子表格——为了编辑电子表格,用户需要使用Excel 12。并且,我们也没有必要在浏览器中能够应用Excel 12的每一个功能,因此,我们将功能主要集中在上述4个目标上。此外,如果用户有权限的话,他们能在浏览器中通过使用一个按钮启动Excel 12打开电子表格,并对它进行任何编辑操作。
Generally, when we talk about interactivity, we generally group the features we enabled into three areas: worksheets, tables, and PivotTables. Let’s take a look at the details of what we did in each area.
通常,当我们谈到交互时,一般集中谈论在工作表、列表和数据透视表中所能实现的功能。先看一下我们在这些方面所做的具体内容。
Interactivity – Worksheets
交互——工作表
As we have already seen, when a user is viewing an Excel-Services-generated spreadsheet in a browser, the visual fidelity between the Excel Services spreadsheet and Excel 12 is very good. Excel Services supports the same layout and formatting capabilities as Excel 12, so to users, a spreadsheet viewed in Excel 12 will look exactly the same as a spreadsheet in a browser (within the constraints of HTML). This includes basic formatting (e.g. row height and column width, font, colour, grid lines on or off, text rotation, etc.) as well as the new features I have already talked about like Data Bars, Colour Scales, Table Styles, and some others I have yet to discuss like charts.
正如我们所看到的,用户在浏览器中查看的由Excel Services创建的电子表格与Excel 12非常相似。Excel Services支持与Excel 12相同的页面布局和格式功能,因此,对用户来说,在Excel 12中的电子表格与在浏览器(仅适用HTML语言)中的电子表格外观相同。包括基本的格式(例如,行高和列宽、字体、颜色、开启和关闭网格线、文字方向等等),就像我已经介绍过的新功能如Data Bars, Colour Scales, Table Styles以及将要介绍的图表等一样。
There is one notable difference between Excel 12 and Excel Services, though – when a user is looking at a spreadsheet in their browser that was generated by Excel Services, only one “section” of the spreadsheet will be served up by Excel Services at a time (this is a performance optimization – less HTML needs to be served up to the client … the number of rows and columns can be configured with defaults of 75 rows by 20 columns). To allow the user to move between sections, we have added paging controls to spreadsheets viewed in the browser.
在Excel 12和Excel Services中有一个明显的不同——当用户在浏览器中查看通过Excel Services创建的电子表格时,Excel Services一次仅显示部分电子表格(这是一种功能优化——传送更少的HTML到客户端……默认为75行和20列)。在浏览器中添加了页面控制按钮允许用户在各部分间切换。
In addition to navigating “sections” within a single worksheet, users will be able to do the following when working with a worksheet in a browser.
在浏览器中处理工作表时,除了能在单个工作表中浏览外,还能做如下操作:
• Page between sheets (using tabs just like in Excel)
• 在工作表之间切换(跟Excel一样使用Tab键)
• Expand and collapse outlining (using buttons on the side and top of the sheet, again like Excel)
• 扩展和折迭层级(跟Excel一样使用工作表侧面和顶部的按钮)
• Set parameters (see previous post)
• 设置参数(见前面的文章)
• Refresh external data and calculate the spreadsheet (to see the most recent data or calculations)
• 更新外部数据并且重新计算工作表(以便于查看最新的数据或计算结果)
• Find values within the worksheet (note this is a separate feature from browser Find – this feature will search for values in the entire worksheet, even the parts that are outside the current “section”).
• 查找工作表中的数值(注:这是一个单独的功能,运用浏览器查找将在整个工作表中查找所需要的值,甚至可在当前部分以外的部分进行查找)
You may have noticed the “toolbar” in the previous screenshots – this is where the controls to calculate, refresh external data, and find (as well as other things) are located.
下面的工具条屏幕截图显示了计算、更新外部数据、查找(也包含其它功能)等功能按钮所在的位置。
Also, since I mentioned charts, here’s a shot of a chart in a page generated by Excel Services in a recent build.
下面是最近用Excel Services创建的一个图表。
Interactivity – Tables and AutoFilters
交互——列表与自动筛选
If a spreadsheet contains a table or autofilters, users will be able to set and update sorts and filters. This includes all of the improvements that I discussed in previous posts here and here with the exception of sorting and filtering by colour. Specifically, users will be able to:
如果电子表格中包含列表或自动筛选,用户将能对排序和筛选进行设置和更新,包括我在以前的文章(见这里和这里)中所介绍的除了通过颜色排序和筛选外所有的改进。具体地讲,用户能进行如下操作:
• Sort ascending or descending
• 升序或降序
• Multi-select filter
• 多条件筛选
• Top 10 filter
• Top 10的筛选
• Set quick filters (”Above Average,” “Below Average,” “Contains,” “Last Month,” etc.)
• 设置快速筛选(”高于均值,” “低于均值,” “包含,” “上个月” 等等.)
• Set custom filters (“Less Than”, “Contains”, etc.)
• 设置自定义筛选(“少于”, “包含”, 等等.)
Interactivity – PivotTables
交互——数据透视表
Similarly, if a spreadsheet contains a PivotTable, users will be able to interact with the PivotTable from within their browser. (Note, I haven’t covered work we have done in the area of PivotTables yet – and we have done a lot – suffice to say that all of the features we have added to PivotTables in Excel 12 have been implemented on the server.) This includes:
同样地,如果电子表格包含有数据透视表,用户能够在浏览器中与数据透视表交互。(注:我还没有介绍在数据透视表方面所做的工作——我们仍然在做——现在只介绍Excel 12提供给服务器的数据透视表的功能)。包括:
• Expand/collapse levels
• 扩展/折迭层级
• Sort ascending or descending
• 升序或降序
• Multi-select filter
• 多条件筛选
• Top 10 filter
• Top 10的筛选
• Set quick filters (”Above Average,” “Below Average,” “Contains,” “Last Month,” etc.)
• 设置快速筛选(”高于均值,” “低于均值,” “包含,” “上个月” 等等.)
• Set custom filters (“Less Than”, “Contains”, etc.)
• 设置自定义筛选(“少于”, “包含”, 等等.)
New for Excel 12, for example, is the fact that you can perform all of these operations on any level of a hierarchy that has been added to the PivotTable, and on member properties for those of you using SQL Server Analysis Services. Much more on that in a series of posts coming soon.
在Excel 12中有一些新的特点,例如,你能使用SQL Server Analysis Services的成员属性在数据透视表任一层级执行所有这些功能。
Controlling all this
控制交互
I can hear the developers reading this asking “what if I don’t want users to be able to sort, filter, etc.?” … for example, if you want to display some data using a PivotTable, but you don’t want people to be able to change the view. We have made it possible to turn off interactivity. You can, for instance, allow users to only sort and not filter, to interact with Tables but not with PivotTables, and more.
在读了这篇文章后,许多开发者问”假如我不想用户能够排序、筛选等?”……例如,如果你想运用数据透视表显示一些数据,但你不想别人能够改变视图,则可以关闭交互功能,允许用户仅能排序但不能筛选,可与列表但不能与数据透视表进行交互,等等。
Controlling Interactivity
控制交互
That’s the summary of interactivity. Please let me know if you have questions. Next time, building applications with Excel web services.
以上概述了交互方面的内容,如果你有疑问可以提出来。下次,介绍用Excel web services创建应用程序。
Published Wednesday, November 16, 2005 10:30 AM by David Gainer
注:本文翻译自http://blogs.msdn.com/excel,原文作者为David Gainer(a Microsoft employee),Excel home授权转载。严禁任何人以任何形式转载,违者必究。
非常感谢Kevin版主的帮助和指导!