Ask Your Question
1

sorting range in calc in 3.6 puts nulls ahead of filled in rows [closed]

asked 2012-08-19 21:02:12 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I have a selected range and when I sort descending by the 2nd column it puts the NULL cells/rows at the top of the rows that contain data.

This is new behavior noticed in 3.6, but not 3.4.2, 3.4.4, 3.5.2, 3.5.3, nor 3.5.4

Here is the code snipit that I've been using for 1 1/2 years:

oSortFields(0).Field = 1
oSortFields(0).SortAscending = FALSE    
oSortDesc(0).Name = "SortFields"
oSortDesc(0).Value = oSortFields()
oCellRange = oSheet.getCellRangeByName("c3:d8")
oCellRange.Sort(oSortDesc())

So if I have cells like this

bob     2
tim     3
brian   4
larry   1
[blank cells]
[blank cells]

And I then when I run the macro to sort the cells, this is what it does:

[blank cells]
[blank cells]
brian   4
tim     3
bob     2
larry   1

This is NOT the expected behavior. Should I file a bug or am I doing something wrong that works in nearly all of the previous versions?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-10-17 15:50:33.245343

Comments

same exact behavior with 3.6.1.1 rc

ptn4egl gravatar imageptn4egl ( 2012-08-19 21:41:39 +0200 )edit

Is it the same through Menu/Data/Sort?

m.a.riosv gravatar imagem.a.riosv ( 2012-08-21 18:21:48 +0200 )edit

no. And I've just discovered a new issue with this...So I'm doing this sort on multiple ranges all with the same parameters, and just changing the ocellRange. It does the odd behavior in all but the last block to sort. I an assigning the cellrange, sorting, assigning, sorting, etc, etc.

ptn4egl gravatar imageptn4egl ( 2012-08-22 00:02:09 +0200 )edit

Are you sure, they are blank cells?, no spaces, no null value.

m.a.riosv gravatar imagem.a.riosv ( 2012-08-22 02:08:44 +0200 )edit

Please open a bug report for it. We changed some parts of the sort code for 3.6.

moggi gravatar imagemoggi ( 2012-08-22 02:48:21 +0200 )edit

Bug opened, and they might contain "" due to a formatting if statement

ptn4egl gravatar imageptn4egl ( 2012-08-23 01:20:25 +0200 )edit

Could you report bug link?

m.a.riosv gravatar imagem.a.riosv ( 2012-08-23 01:42:50 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2013-02-22 09:09:31 +0200

qubit gravatar image

Bug appears to be fdo#53814 - Macros: sorting range in calc in 3.6 puts nulls ahead of filled in rows

Current status: RESOLVED FIXED

Todo: Resolve Question as Bug Filed

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-08-19 21:02:12 +0200

Seen: 584 times

Last updated: Feb 22 '13