sort method

sort

Sort the data in the range.

Returns

the original indices(absolute position, for example, column A is 0, B is 1, …) of the sorted rows/columns. If no rows/columns needs to be moved by this sorting operation, null will be returned.

def sort(self):
    ...

sort

Sort the data of the area.

Returns

the original indices(absolute position, for example, column A is 0, B is 1, …) of the sorted rows/columns. If no rows/columns needs to be moved by this sorting operation, null will be returned.

def sort(self, cells, area):
    ...
ParameterTypeDescription
cellsCellsThe cells contains the data area.
areaCellAreaThe area needed to sort

sort

Sorts the data of the area.

Returns

the original indices(absolute position, for example, column A is 0, B is 1, …) of the sorted rows/columns. If no rows/columns needs to be moved by this sorting operation, null will be returned.

def sort(self, cells, start_row, start_column, end_row, end_column):
    ...
ParameterTypeDescription
cellsCellsThe cells contains the data area.
start_rowintThe start row of the area.
start_columnintThe start column of the area.
end_rowintThe end row of the area.
end_columnintThe end column of the area.

See Also