Ich habe jetzt einen anderen Weg versucht,
endlich die Tabelle zu sortieren - auch das geht nicht??
Über Makro-aufzeichnen kam ich hierzu, wobei ich jetzt die Werte der Sub
übergebe:
> mySort("$A$2", "$A$2:$V$403", 9)
sub mySort (topLeft as String, sRange as String, sortColumn as Integer)
rem ----------------------------------------------------------------------
rem define variables
dim oDocSort as object
dim oDispat as object
rem ----------------------------------------------------------------------
rem get access to the oDocSort
oDocSort = ThisComponent.CurrentController.Frame
oDispat = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Nr"
args1(0).Value = 1
oDispat.executeDispatch(oDocSort, ".uno:JumpToTable", "", 0, args1())
rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "ToPoint"
args2(0).Value = topLeft ' "$A$2"
oDispat.executeDispatch(oDocSort, ".uno:GoToCell", "", 0, args2())
rem ----------------------------------------------------------------------
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "ToPoint"
args3(0).Value = sRange ' "$A$2:$V$403"
oDispat.executeDispatch(oDocSort, ".uno:GoToCell", "", 0, args3())
rem ----------------------------------------------------------------------
dim args4(9) as new com.sun.star.beans.PropertyValue
args4(0).Name = "ByRows"
args4(0).Value = true
args4(1).Name = "HasHeader"
args4(1).Value = false
args4(2).Name = "CaseSensitive"
args4(2).Value = false
args4(3).Name = "NaturalSort"
args4(3).Value = false
args4(4).Name = "IncludeAttribs"
args4(4).Value = true
args4(5).Name = "UserDefIndex"
args4(5).Value = 0
args4(6).Name = "Col1"
args4(6).Value = sortColumn
args4(7).Name = "Ascending1"
args4(7).Value = true
args4(8).Name = "Col2"
args4(8).Value = 2
args4(9).Name = "Ascending2"
args4(9).Value = false
oDispat.executeDispatch(oDocSort, ".uno:DataSort", "", 0, args4())
end sub
Damit kriege ich die Sortierresultat (??? ratlos)
Spalte "J" = 9
LotsMultiplier=1.5
LotsMultiplier=1.5
LotsMultiplier=1.5
LotsMultiplier=1.5
LotsMultiplier=1.5
LotsMultiplier=1.5
LotsMultiplier=2
LotsMultiplier=2
LotsMultiplier=2
LotsMultiplier=2
LotsMultiplier=2
LotsMultiplier=1.5
LotsMultiplier=1.5
LotsMultiplier=1.5
LotsMultiplier=1.5
....
Immerhin hir wurde sogar etwas bewegt, mit
oSortRange.Sort(aSortDesc())
passierte gar nichts?
Ist das ein bekannter Bug?
gooly
--
Informationen zum Abmelden: E-Mail an users+help@de.libreoffice.org
Tips zu Listenmails: http://wiki.documentfoundation.org/Netiquette/de
Listenarchiv: http://listarchives.libreoffice.org/de/users/
Alle E-Mails an diese Liste werden unlöschbar öffentlich archiviert
Context
- [de-users] Tabelle sortieren geht doch nicht? (2) · gooly
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.