7.2 Sorting

A spreadsheet can be sorted by clicking on a column header. That spreadsheet will be sorted according to the data values in the associated column. If the data in the column to be sorted contains both numeric and non-numeric values, each set (numeric and non-numeric) will be sorted independently and then concatenated together.

Multiple columns can be sorted simultaneously by selecting the ``Sort Spreadsheet..." option from the top level Data menu. This will launch a dialog that can be seen in Figure 7.2. This dialog can also be launched by right-clicking on any column header and selecting the ``Sort Spreadsheet..." option from the generated popup menu.

Figure 7.2: Sorting the spreadsheet
 
spreadsheetsort.png

This sorting dialog allows for the selection of up to three columns. The spreadsheet will be sorted by the first column selected, with ties being broken by the remaining columns. The sorted columns can be moved to the front of the spreadsheet by selecting the ``Move Sorted Columns to Start" option in the dialog.

The first time the spreadsheet is sorted, it may take longer than expected as the data values need to be retrieved from the molecule and any expressions must be calculated. The progress of the sort is indicated in the progress bar at the bottom of the application. If desired, the sort can be aborted by clicking on the stop button to the left of the progress bar.