Using Sort action

The Sort action in the Excel advanced package enables you to sort numeric and text data within a specific column of a table or worksheet.

Settings

Important: Ensure that Microsoft Excel is set to the same language as that of the computer operating system.
  • Double-click or drag the Sort action from the Excel node in the Actions palette.
  • Click one of the following tabs:
    • Table
      • Specify the Table name for which you want to sort the data.
        Note: The table name is a string value and NOT a data table name. For information on how to retrieve the Excel table name, see Rename an Excel table.
      • In Sort for, select one of the following options:
        • Column name: Enter the column name or click the Insert a value icon to select an existing variable.
        • Column position: Enter the column number or click the Insert a value icon to select an existing variable.

          For example, you have a table called Monthly sales that contains three columns: April, May and June. If you want to sort the order of the column May in the table, enter May in the Column name field or enter 2 in the Column position field.

    • Worksheet
      1. Worksheet name: to specify the name of the worksheet where you want to sort data.
      2. Use the Sort for field to specify the column of the table that you want to sort the data:
        • Column name: To specify the name of the column.
        • Column position: To specify the position of the column.
      3. Use the Cell range field to enter the range of cells in the worksheet where you want to sort the data.

        For example, you have a worksheet that contains three columns: A, B, and C. If you want to sort data in the second and third columns, enter B2, C3 in the Range field.

      4. Use the Apply sort on field to select one of the following options:
        • All columns: to sort data across all the columns in the worksheet.
        • Only mentioned column: to sort data for only the column mentioned in the Column name or Column position field above.
      5. Clear the Data has headers check box if the specified columns in the worksheet does not have any headers.
  • In Sort order, select one of the following options:
    • Number: Click the drop-down menu to select an ascending or descending sort order for the values in the column.
    • Text: Click the drop-down menu to sort the column values in an alphabetical order (A-Z or Z-A).

      From the previous example, if the May column contains numerical values and you want to sort them in a descending order, select Number > Largest to smallest in the drop-down menu. However, if the values are alphabets or text, select Text > Z-to-A.

  • Enter the name of the session used to open the workbook with the Open action.

    You can also click the Variable tab and select an existing Excel advanced session variable.

  • Click Save.