OpenOffice.org OpenOffice - 3.2 Guia Básico Página 369

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 497
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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
Vista de página 368
1 2 ... 364 365 366 367 368 369 370 371 372 373 374 ... 496 497

Comentários a estes Manuais

Sem comentários