Tables Part 1_处理列表中的数据_Excel 2007新知
Tables Part 1: Working With Tables Of Data
列表(第一部分):处理列表中的数据
(译者注:本文中的“列表”其原文为“Table”,在已经发布的Excel中有一项功能称为“模拟运算表”【在数据菜单中】,在其相应当英文版本中也是“Table”,本人认为本文讨论的Excel 12新功能不同于现在的模拟运算表,所以使用“列表”一词,在最终发布的Excel 12中文版本中所使用的名称可能与本文不同,特此说明。)
For the next few posts, I'd like to spend some time explaining the work we've done in Excel 12 to improve the experience of working with tabular data in Excel.
接下来几章中,我将花一些时间来解释一下Excel 12如何改善对于表格化数据(译者注:原文中的Tabular Data)的处理。
One thing that we see pretty much every Excel user doing with some frequency is working with tables. Tables can mean different things to different people so let me briefly define what we think of when we use the word table. A table is a simple structure where each row corresponds to a single “thing“ (e.g. a specific transaction, an individual product, etc.), and each column denotes a specific piece of information that's shared by all rows (e.g. amount of each transaction, product quantity, etc.). Tables typically have a “header“ row at the top that defines the information that each column contains. Some examples of tables might be a list of financial transactions or the latest inventory numbers pulled from a server. Here's an example of a very simple (and fictitious) table.
我相信每一个Excel的用户都会非常频繁的用到表格。在不同场合“表格”这个词有很多种含义,让我先来简单的定义一下我们所说的列表,列表是指一个简单的结构,列表的行对应于一个单一“项目”(例如:一个交易,一种产品等等),列表的列表示每个项目的某些具体信息(例如:每项交易的金额,产品数量等等)。典型的列表拥有标题行,一般位于列表的第一行,它用来定义每列所包含的内容,列表也可以是交易清单或者从服务器上得到的最新的库存数量。这里有一个非常简单的列表。
The two-dimensional nature of the spreadsheet makes it an obvious canvas for manipulating and analyzing tabular data. Excel, however, has traditionally offered very little in the way of features aimed at tabular data because it had no built-in knowledge of what a table is or how it should behave. We've done a lot of work to make tables a native structure in Excel 12. When Excel knows you are working with a tabular structure, it can react much more intelligently to the actions you perform in the grid. Let me demonstrate by way of a simple example. Here is what our table might look like if we formatted the table, applied a data bar to the Profit column, added a chart, and added a formula at the top of the sheet that totals the Profit column.
支持二维数据存储的电子数据表格可以很容易的处理和分析表格化数据,然而传统的Excel只能提供很少的处理表格化数据的功能,究其原因在于Excel并没有内置关于列表的相关内容,如列表是什么样子的,如何操作列表。我们做了很多工作,使列表完全的融入Excel 12。对比以前在列表中进行数据操作,在新版本中,一旦Excel认为用户在使用列表,那么它将提供更智能化的反应,让我们用一个简单的例子解释一下,下面是我们格式化后的列表,对于“Profit”列使用Data Bars(译者注:如希望更多的了解Data Bars请参考本版面的帖子“条件格式概览——Data bars”),添加一个图表并且在列表上方添加一个公式用于计算“Profit”列数据的总和。
The next thing I might typically do is add some more data. Let's look at what happens when I type a value just below the table in cell D9.
接下来添加数据,我仅在D9单元格输入一个数值,我们看一下工作表有什么变化。
After I pressed Enter, several things happened for me automatically:
在我按下<Enter>键之后,工作表自动作出了如下的反应:
1. The value that I entered was consumed into the table. Excel assumed I was appending data to my table (if I wasn't, one click will tell Excel to not auto-expand the table)
2. When the table consumed the data, my table formatting automatically extended to the new row - and notice that it was smart enough to maintain my alternating row colors
3. The conditional formatting data bar also extended to the new row, so Excel is now using D5:D9 to calculate the relative size of the data bars
4. The formula at the top updated itself to include the new data
5. Finally, the chart updated as well to reflect the addition to our table
1. 我输入的数据加入列表中,Excel假设我在向列表追加数据 (如果用户不需要这个结果,只需要点击一下告知Excel不需要自动扩大列表)
2. 当新数据融入列表时,我的列表格式自动扩展到新的数据所在行,请注意这项功能非常智能的延续了原来列表的间隔行颜色格式
3. 条件格式的数据条同样扩展到新的数据行,Excel将用D5:D9的数据重新计算Data Bars的大小
4. 求和公式自动更新,结果将包含新添加的数据
5. 最后,图表同时更新反映出列表中添加的数据
Without a table, I would have to manually adjust the cell formatting, conditional formatting, formula and chart every time I append a value. What would have taken half a dozen steps or more now happens for me automatically thanks to the table feature. This is because Excel now recognizes features like a table, table columns, table header and so forth, and can use that knowledge to make informed decisions about what to do while I'm working in the spreadsheet. The best part is that I am just scratching the surface here; it will take me several posts to fully explain the benefits of tables and all the new features surrounding it. For now let's cover some basics.
如果没有上述的列表功能,每次追加数据时,我需要手工设置单元格格式,添加格式,公式和图表,这些大约需要六步操作才能完成,由于列表功能的出现,使得这些工作可以自动完成,新的Excel具备识别功能,它能够识别列表,列,标题等等,当用户在电子数据表格操作时,系统会作出相应当反应。在这里我们只是简单的介绍列表功能,在随后的帖子中,我将详细阐述使用列表的好处和所有相关的新功能,现在让我介绍一下基本知识。
Creating Tables
生成列表
A table can be created simply by clicking on the Table command on the Insert tab in the ribbon (even quicker, use the CTRL+L shortcut key). Clicking the Table command brings up a dialog box where you specify the range for your table, and indicate if your data already contains a header row.
用鼠标点击Ribbon上的Insert标签中的Table就可以生产一个列表(如果希望更快,可以直接使用快捷键 <CTRL+L>),此时系统将出现一下对话框,用户可以指定工作表中的某个区域为列表,并声明数据是否包含标题行。
When you create a table, a new tab appears on the ribbon that is specifically designed for tables. The tab only appears when the active cell is inside a table. The tab contains options and settings that are geared for tables. I won't go into the details right now, but here's a screenshot.
当用户生成列表时,一个新的专门用于设计列表的标签将出现在Ribbon上,只有当前活动单元格位于列表中才可以看到这个标签,该标签可以用来调整列表的可选项和设置。我们不在此详细解释其全部功能,仅提供界面的截屏。
Another bit of work that we did was to merge our table feature with the existing external data query functionality, sometimes referred to as query table. New queries will therefore also benefit from the features of tables (at the moment, web queries and text queries are excluded from this). I think the benefit of making query tables into tables will become clear over the next week or two as I go over the capabilities of Excel 12 tables. Note, if you have an existing query, you can convert it to a table using the Ribbon or keyboard shortcuts described above. Tables are also created when you import XML data using the XML features we added in Excel 2003.
另外一个改进是我们将现在的外部数据查询(有时也称为查询表)融入新的列表功能,新的查询功能由于引入列表功能而得到加强(同时网站查询和文本查询功能将取消),在接下来的一两周中即将对Excel 12性能进行最终审查,我认为届时查询表融入列表功能的好处将显而易见。注意:用户可以使用上面讲到的Ribbon或者快捷键将现在在用的查询表转换为列表,当使用Excel2003新增加的XML功能导入XML数据时也将生成列表。
Entering Data into a Table
在列表中输入数据
We already saw in the example above how to add a new row to a table. Adding a new column works the exact same way. Place the active cell just outside the table to the right, enter a value and Excel will automatically grow the table to consume the data that you entered. If this isn't the desired result, then a simple command will shrink the table back and leave the value outside the table. This “auto-expand“ behavior can also be turned off.
由上面的示例我们已经知道如何在列表中添加新的一行,使用类似的方法可以添加新的一列,将活动单元格设置在列表的右侧,输入数据,Excel将自动扩大列表,使其包含新输入的数据,如果用户并不想将新的数据添加到列表,一个简单的操作就可以将列表恢复原状,新添加的数据将保留在列表外。“自动扩展”功能可以设置为关闭。
There are a couple other ways to add rows. Much like tables in Word, pressing TAB when the active cell is in the last column of the last row will cause Excel to add a new row and move the active cell to the first column of the newly added row. In addition, pressing ENTER when the active cell is in any cell of the last row will also cause a new row to be added.
还有几种方法可以添加行,有些像Word中的表格,当活动单元格为列表的右下角单元格,此时按<Tab>键,Excel就为列表添加新的一行,并且活动单元格移到新添加行的第一列,另外,当活动单元格位于最后一行的任何单元格,按下<Enter>键,Excel都将添加新的一行。
Finally, if you want a quick way to resize your table to add or subtract rows or columns, click the resize handle in the lower-right corner of the table and drag it in the direction desired. You can spot the resize handle in the screen shots above.
最后,如果用户需要快速的调整列表的大小,也就是添加或者删除行和列,点击右下角的“resize”,然后根据需要拖动就可以调整列表的大小了。你可以从上图中看“resize”。
One of the goals of the table feature is to maintain the integrity of your tabular structure, so the only way to shift cells or create space in a table is to add or insert entire table rows or entire table columns.
列表功能的一个目标就是保持表格结构的完整性,所以在列表中移动单元格或者添加空白的唯一方法就是添加、插入整行或者整列。
By the way, some of this may look familiar if you've ever used the list feature in Excel 2003. The table feature is in fact based off lists, but as you'll see over the next few days we've built a much more comprehensive feature set around tables.
顺便说一下,如果你曾经使用过Excel 2003的相关功能,那么你会熟悉上面的某些操作,事实上列表功能并不是基于以前的功能,接下来的几天你就可以看到,我们围绕列表功能可以实现更复杂的功能。
Over the next few days I plan to show you:
接下来的几天,我计划向大家展示下面的内容:
· More of the core features of tables
更多的列表核心功能
· The great things that happen when tables and formulas collide
如何处理列表和公式的冲突
· Filtering table data & AutoFilter improvements
列表筛选和自动筛选的改善
· Table Styles and smart formatting behaviors
列表风格和智能格式化
Published Tuesday, October 25, 2005 3:56 PM by David Gainer
注:本文翻译自http://blogs.msdn.com/excel ,原文作者为David Gainer(a Microsoft employee),
需要保留本文链接地址:http://www.excelxx.com/xuexixinde/10888.html
- → 对编辑公式功能的改进Part 4_名称
- → 更多有关条件格式的内容……
- → 在VBA中使用条件格式的示例_Excel 2007新知
- → 条件格式与Ribbon_Excel 2007新知
- → 对编辑公式功能的改进Part 1_Excel 12 编辑栏_Excel 2007新知
- → 对编辑公式功能的改进Part 3_Excel 2007新知
- → 对编辑公式功能的改进Part 2_Formula AutoComple_Excel 2007新知
- → Excel根据颜色查找求和-excel函数教程-excel怎么求和
- → Excel教程:Excel神技能——合同到期日的计算与提醒-excel函数教程
- → Excel教程:Excel中输入日期最快的方式竟然是数据分列!-excel函数教程