OOo 3.1 - Sort in reverse order

Discuss the spreadsheet application

OOo 3.1 - Sort in reverse order

Postby andyqkw » Thu May 21, 2009 6:57 am

Just installed OOo 3.1 and the sort function in Calc are not functioning correctly.

Clicking on the sort icon A -> Z returns the result as Z -> A instead.

Same goes to Z -> A, returning the result as A -> Z.
OOo 3.1.1 on Windows Vista Home Premium SP2 64-bit
andyqkw
 
Posts: 25
Joined: Thu Nov 22, 2007 4:24 pm
Location: Singapore

Re: OOo 3.1 - Sort in reverse order

Postby Nikos » Thu May 21, 2009 11:48 am

Sounds strange...

but cannot replicate it.
LibreOffice 4.0.5 on OpenSuse 12.3/64bit/KDE4.10 (Version from the TDF page) + LibreOffice 4.1.1 on Debian Wheezy/64bit/KDE4.8 + LibreOffice 4.1.1 on Win7/64bit
Nikos
 
Posts: 172
Joined: Mon Dec 17, 2007 11:50 am

Re: OOo 3.1 - Sort in reverse order

Postby FJCC » Thu May 21, 2009 2:05 pm

I also can't replicate the effect. Could you post some details about what you are trying to sort and what happens?
AOO 3.4 or 4.0 on MS Windows XP ( before 2013-08-03) or Windows 7
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Moderator
 
Posts: 3674
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: OOo 3.1 - Sort in reverse order

Postby TheGurkha » Thu May 21, 2009 3:26 pm

Strange, indeed. Look at my two screen shots. They both have the same dummy data. One of them is sorted A->Z and the other Z->A. In the Z->A order it doesn't seem to be sorting the very first cell.

2009-05-21_142327.jpg
Sorted A -> Z

2009-05-21_142336.jpg
Sorted Z -> A
Ubuntu 13.04 Raring ringtail, LibO 4.0.2.2 (Build ID 400m0 (Build:2))
Gurkha Welfare Trust
User avatar
TheGurkha
Moderator
 
Posts: 6426
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: OOo 3.1 - Sort in reverse order

Postby acknak » Thu May 21, 2009 3:34 pm

I suspect that Calc finds a text value in the first cell and assumes it's a column heading, so it stays at the top.
AOO 4 • Linux • Fedora 17
User avatar
acknak
Moderator
 
Posts: 17400
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: OOo 3.1 - Sort in reverse order

Postby Villeroy » Thu May 21, 2009 3:36 pm

The first row is treated as column label. It's a shame that the developers are unable to write a working label detector.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 12.04, Apache OpenOffice 4.x
User avatar
Villeroy
Volunteer
 
Posts: 17291
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: OOo 3.1 - Sort in reverse order

Postby andyqkw » Sat May 23, 2009 6:28 am

Did some further testing myself...

This document of mine was initially created with OOo 2.X and is saved in .xls format.

On one spreadsheet (created this year), Calc sorts the data in reverse order for row 2 - 46 (row one being the header) and anything from row 47 onwards sorts in the correct order.

On another spreadsheet (created few years back), Calc sorts in complete random order regardless of rows number.

Tried creating a new spreadsheed with OOo 3.1 but couldn't reproduce the error???
OOo 3.1.1 on Windows Vista Home Premium SP2 64-bit
andyqkw
 
Posts: 25
Joined: Thu Nov 22, 2007 4:24 pm
Location: Singapore

Re: OOo 3.1 - Sort in reverse order

Postby andyqkw » Thu Jun 04, 2009 6:04 pm

I've uploaded a sample file for all experts out there to see, it's sorting the column in random order...
Attachments
Sample.xls
(9 KiB) Downloaded 102 times
OOo 3.1.1 on Windows Vista Home Premium SP2 64-bit
andyqkw
 
Posts: 25
Joined: Thu Nov 22, 2007 4:24 pm
Location: Singapore

Re: OOo 3.1 - Sort in reverse order

Postby Dave » Thu Jun 04, 2009 6:09 pm

In the sort window, look for the "Options" tab, and "Range contains column labels". Deselect that to include the top item.

David.
Dave
 
Posts: 1011
Joined: Sun Dec 23, 2007 6:53 pm

Re: OOo 3.1 - Sort in random order

Postby andyqkw » Sun Jun 28, 2009 8:57 am

Tried that, doesn't work.
OOo 3.1.1 on Windows Vista Home Premium SP2 64-bit
andyqkw
 
Posts: 25
Joined: Thu Nov 22, 2007 4:24 pm
Location: Singapore

Re: OOo 3.1 - Sort in reverse order

Postby Villeroy » Sun Jun 28, 2009 12:42 pm

Running Sun's version of OOo3.1, I changed the description values in the above "Sample.xls" to ...
Code: Select all   Expand viewCollapse view
one
two
three
four
five
six

... so I have better control which text is sorted with which number.

I click any cell in the list's first column and quick-sort [A-Z]:
Code: Select all   Expand viewCollapse view
Description   Amount
five   $5.00
four   $4.00
one   $1.00
six   $6.00
three   $3.00
two   $2.00

It correctly sorts the first column alphabetically, detecting the first header row.
Hitting the [Z-A] button, I get the exact reverse order.
Code: Select all   Expand viewCollapse view
Description   Amount
two   $2.00
three   $3.00
six   $6.00
one   $1.00
four   $4.00
five   $5.00

Focussing a cell in the second column I get from [A-Z]
Code: Select all   Expand viewCollapse view
Description   Amount
one   $1.00
two   $2.00
three   $3.00
four   $4.00
five   $5.00
six   $6.00

and [Z-A]
Code: Select all   Expand viewCollapse view
Description   Amount
six   $6.00
five   $5.00
four   $4.00
three   $3.00
two   $2.00
one   $1.00

In either case the sorted range gets selected if I focussed just a single cell.
menu:Data>Sort... gives the same 4 results, sorting each of the two columns in ascending and descending order.

I append values "seven" and 7 in row #8, click [A-Z], [A-Z] and to my surprise the new row gets included although I did not insert a new row of cells into the existing data range. Everything sorts perfectly.
Alphabetical by column A ("Description"):
Code: Select all   Expand viewCollapse view
Description   Amount
five   $5.00
four   $4.00
one   $1.00
seven   $7.00
six   $6.00
three   $3.00
two   $2.00

the reverse order is exactly revers, numeric sorting of column B ("Amount") works as well.

Now I define a database range in menu:Data>Define... with "List" as name, $Sample.$A$1:$B$19 as reference and first row as column headers. It includes the whole assumed list including the yet empty cells.
I repeat all the above tests, append "eight" and 8, do it again and everything sorts just perfectly, but now selecting the whole defined data range A1:B19.
I clear some values in both columns and everything sorts as expected.
Completely empty rows are excluded from sorting. They always stick at the bottom of the list whereas empty values with associated neigbour values are sorted (empty is considered larger than any number or text, all text is larger than any number).

The developers did a very good job when they newly implemented the spreadsheet sorting after so many years of valid complaints. One embarrassing error issue 101690 slipped in, though. But that bug has nothing to do with the constant values in this example.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 12.04, Apache OpenOffice 4.x
User avatar
Villeroy
Volunteer
 
Posts: 17291
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: OOo 3.1 - Sort in reverse order

Postby Villeroy » Mon Jun 29, 2009 12:14 pm

P.S. and off-topic:
Demo of the stable sorting, introduced in v3.1:

Randomly sorted integers:
Code: Select all   Expand viewCollapse view
1   2   4   10
0   1   3   8
1   3   7   15
0   1   3   7
0   0   0   2
0   0   1   3
1   2   5   12
0   0   0   1
1   3   6   13
1   2   4   9
1   3   6   14
1   3   7   16
0   0   1   4
0   1   2   6
0   1   2   5
1   2   5   11

Activate a cell in column #1 and sort, then sort column #2, #3 and #4.
The result is a sort order by more than three columns:
Code: Select all   Expand viewCollapse view
0   0   0   1
0   0   0   2
0   0   1   3
0   0   1   4
0   1   2   5
0   1   2   6
0   1   3   7
0   1   3   8
1   2   4   9
1   2   4   10
1   2   5   11
1   2   5   12
1   3   6   13
1   3   6   14
1   3   7   15
1   3   7   16
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 12.04, Apache OpenOffice 4.x
User avatar
Villeroy
Volunteer
 
Posts: 17291
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: OOo 3.1 - Sort in random order

Postby andyqkw » Mon Jun 29, 2009 7:36 pm

Numbers sorts fine for single column sorting. But for text, the first row/column is ignored.

This issue was mentioned in this thread http://user.services.openoffice.org/en/forum/viewtopic.php?f=9&t=19681 and others as well...

It's a shame that OOo was not able to release a patch file for this problem instead of having users waiting till Aug 09 or even later for 3.1.1 to be released.
OOo 3.1.1 on Windows Vista Home Premium SP2 64-bit
andyqkw
 
Posts: 25
Joined: Thu Nov 22, 2007 4:24 pm
Location: Singapore

Re: OOo 3.1 - Sort in reverse order

Postby Villeroy » Mon Jun 29, 2009 7:49 pm

If your list is not supposed to have column labels, define a database range and unckeck "Contains column labels" and use the menu command. I'd simply add column labels. They don't hurt.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 12.04, Apache OpenOffice 4.x
User avatar
Villeroy
Volunteer
 
Posts: 17291
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: OOo 3.1 - Sort in reverse order

Postby acknak » Mon Jun 29, 2009 10:34 pm

I must be missing something: I don't understand why we're running around in circles here.

I can't reproduce any problem using the "Sample.xls" file that was attached here. Does anyone see a problem with that file? If so, what exactly?

andyqkw wrote:This issue was mentioned in this thread...

Sorry, but as I understand the situation, that is an entirely separate problem with sorting in OOo 3.1. That problem only affects sorting cells that contain formulas. Your sample file contains only static (unchanging) data (excepting the total cell, which I assume is not part of area you want to sort).

Can someone (andyqkw?) please provide a sample file, and/or instructions to reproduce the problem? A description or screenshots like Gurkha's might be helpful also. If someone's already done that, and I just missed it, then I apologize up front ;-)
AOO 4 • Linux • Fedora 17
User avatar
acknak
Moderator
 
Posts: 17400
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3


Return to Calc

Who is online

Users browsing this forum: No registered users and 10 guests