I try to sort a cellrange with python.
This is my code:
Code: Select all
def sortSheet(self,sortArea):
from com.sun.star.table import TableSortField
rSortArea = self._oSheet.getCellRangeByName("A1:C10")
sortFld = TableSortField
sortFld.Field = 0
sortFld.IsAscending = True
sortDesc = (PropertyValue("SortFields",0,sortFld,0),
PropertyValue("ContainsHeader",0,False,0))
rSortArea.sort(sortDesc)
I tried already many things but I can´t find a solution.
I am working with OpenOffice 2.3 on Ubuntu Gutsy 7.10.
Does anybody have a hint for me?