Bug 57561

Summary: Sort: Guess if "Range contains column headings"
Product: LibreOffice Reporter: michael
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED WORKSFORME    
Severity: enhancement CC: jbfaure, raal
Priority: medium    
Version: 3.5.7.2 release   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:

Description michael 2012-11-26 16:09:29 UTC
When selecting a range of data and sorting, it would be nice if Calc could guess the appropriate value for the "Range contains column headings" check box (a feature which Excel has had for years).

Criteria for identifying potential column headings could be:
- Content type (e.g. A1 contains text, A2 and further down contain numbers)
- Formatting (font attributes, cell background, border) of first row differs from subsequent rows
- Freeze Panes is active (the frozen cells are likely to be header cells)
- Previous selections (this seems to happen already at least in some cases)

Further extensions:
- When the range has column headings, use their text instead of "Column A" etc. (right now, this already happens but the sort criteria are not updated when checking "Range contains column headings")
- Handle multiple heading rows (which is not too uncommon a situation)

See also #54929, which might need this "header row recognition" as well
Comment 1 Jean-Baptiste Faure 2014-10-12 20:13:34 UTC
Nobody confirmed this independently. Set status back to unconfirmed.

Best regards. JBF
Comment 2 raal 2014-10-14 05:41:37 UTC
Tested with LO 4.3.2, win7 and works for me

1	2	3
2	3	4
3	4	5
data -> Sort -> "Range contains column headings" not ticked

aa	bb	cc
1	2	3
2	3	4
data -> Sort -> "Range contains column headings" ticked

Feel free to set back to 'unconfirmed' if I'm  wrong.