OpenOffice.org OpenOffice - 3.2 Guida di base Pagina 369

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 497
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 368
Figure 310: 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 I 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.
Chapter 13 Calc as a Simple Database 369
Vedere la pagina 368
1 2 ... 364 365 366 367 368 369 370 371 372 373 374 ... 496 497

Commenti su questo manuale

Nessun commento