OpenOffice.org OpenOffice - 3.3 Grundlegende Anleitung Seite 324

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 434
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 323
Figure 327: Use the standard filter
The macro in Listing 14 creates a simple filter for the first sheet.
Listing 14. Create a simple sheet filter.
Sub SimpleSheetFilter()
Dim oSheet ' Sheet that will contain the filter.
Dim oFilterDesc ' Filter descriptor.
Dim oFields(0) As New com.sun.star.sheet.TableFilterField
oSheet = ThisComponent.getSheets().getByIndex(0)
REM If argument is True, creates an empty filter
REM descriptor. If argument is False, create a
REM descriptor with the previous settings.
oFilterDesc = oSheet.createFilterDescriptor(True)
With oFields(0)
REM You could use the Connection property to indicate
REM how to connect to the previous field. This is
REM the first field, so this is not required.
'.Connection = com.sun.star.sheet.FilterConnection.AND
'.Connection = com.sun.star.sheet.FilterConnection.OR
REM The Field property is the zero based column
REM number to filter. If you have the cell, you
REM can use .Field = oCell.CellAddress.Column.
324 OpenOffice.org 3.3 Calc Guide
Seitenansicht 323
1 2 ... 319 320 321 322 323 324 325 326 327 328 329 ... 433 434

Kommentare zu diesen Handbüchern

Keine Kommentare