2009/5/24 Oliver Brinzing <[email protected]>: > Hi Johnny, > >> With Xray I found not only createSearchDescriptor in a range, but also >> createSortDescriptor. However, I can't find any information anywhere >> about how to use it. The Search thing is easy and II use it all the >> time, like this: > > http://wiki.services.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Sorting
Yes, that was one of the examples that I was talking about. So my question remains: How can I sort using the method I described in my original post, rather than the method described at various places at the Internet? Take a look at this: Sub Test Dim Range As Object Dim x As Integer, a As Integer, b As Integer, c As Integer, d As Integer Range=ThisComponent.getSheets().getByIndex(x).getCellRangeByPosition(a,b,c,d) Xray Range End Sub Run this. When Xray dialogue opens, select Methods and sort A-Z, then scroll down. Down there you'll find ”createSortDescriptor”. I want to use it, but I have found no examples that does and everything I tried so far failed. The link you provided is certainly enough for me to being able to sort, BUT it doesn't use the Range.createSortDescriptor at all, as far as I can see. My question isn't about how I can sort, because there are a lot of examples on how to do that, yours are one of them. My question is how to use the ”createSortDescriptor” of a range like that one described above. If it's impossible, I wonder why they included ”createSortDescriptor” for ranges in the first place. If it's there, it should be possible to use, right? I am still learning this stuff, and I just want to understand how to do certain tasks in different ways. If this way to sort is possible, I can see a great advantage with it, compared to the other method: The code seems to be much ”cleaner” and easier to follow. At least I think so at the moment… Kind regards Johnny Rosenberg > > Oliver > > -- > > GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
