OpenOffice.org OpenOffice - 3.3 Základní průvodce Strana 328

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 434
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 327
Dim oCritRange 'Range that contains the filter criteria.
Dim oDataRange 'Range that contains the data to filter.
Dim oFiltDesc 'Filter descriptor.
REM Range that contains the filter criteria
oSheet = ThisComponent.getSheets().getByIndex(1)
oCritRange = oSheet.getCellRangeByName("A1:G3")
REM You can also obtain the range containing the
REM filter criteria from a named range.
REM oRanges = ThisComponent.NamedRanges
REM oRange = oRanges.getByName("AverageLess80")
REM oCritRange = oRange.getReferredCells()
REM The data that you want to filter
oSheet = ThisComponent.getSheets().getByIndex(0)
oDataRange = oSheet.getCellRangeByName("A1:G16")
oFiltDesc = oCritRange.createFilterDescriptorByObject(oDataRange)
oDataRange.filter(oFiltDesc)
End Sub
Change properties on the filter descriptor to change the behavior of the filter (see
Table 16).
The filter created in Listing 17 filters the data in place. Modify the OutputPosition
property to specify a different output position (see Listing 18). The filter descriptor
must be modified before the filter is applied.
328 OpenOffice.org 3.3 Calc Guide
Zobrazit stránku 327
1 2 ... 323 324 325 326 327 328 329 330 331 332 333 ... 433 434

Komentáře k této Příručce

Žádné komentáře