摘要 |
Some embodiments provide a system for displaying cells of a table. During operation, the system can receive a sort-and-merge request for sorting the rows of the table using a sort column. Next, the system can sort the rows of the table based at least on cell values in the sort column to obtain a sorted table. The system can then merge a set of consecutive cells in a merge column of the sorted table to obtain a merged cell, wherein the set of consecutive cells are associated with the same cell value. Note that the sort column and the merge column can be the same column, or they can be different columns. Next, the system can display the merged cell and other cells in the sorted-and-merged table. Displaying a cell can involve positioning the cell's value in a visible area of the cell.
|