sorts a range of cells
range | string | optional, the range of cells that should be sorted, null to sort the selected range |
dir | string | optional, the sorting direction: "asc" or "desc" ("asc" by default) |
// sorts the specified range in the default ("asc") order
$$("ssheet").sortRange("B2:B4");
// sorts the specified range in the descending order
$$("ssheet").sortRange("B2:B4", "desc");
// sorts the selected range in the descending order
$$("ssheet").sortRange(null,"desc");