OpenOffice.org OpenOffice - 3.2 Guía básica Pagina 355

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 497
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 354
The example in Listing 9, however, demonstrates how to sort on two
columns.
Listing 9. Sort cells A1:C5 on Sheet 1.
Sub SortRange
Dim oSheet ' Calc sheet containing data to sort.
Dim oCellRange ' Data range to sort.
REM An array of sort fields determines the columns that are
REM sorted. This is an array with two elements, 0 and 1.
REM To sort on only one column, use:
REM Dim oSortFields(0) As New com.sun.star.util.SortField
Dim oSortFields(1) As New com.sun.star.util.SortField
REM The sort descriptor is an array of properties.
REM The primary property contains the sort fields.
Dim oSortDesc(0) As New com.sun.star.beans.PropertyValue
REM Get the sheet named "Sheet1"
oSheet = ThisComponent.Sheets.getByName("Sheet1")
REM Get the cell range to sort
oCellRange = oSheet.getCellRangeByName("A1:C5")
REM Select the range to sort.
REM The only purpose would be to emphasize the sorted data.
'ThisComponent.getCurrentController.select(oCellRange)
REM The columns are numbered starting with 0, so
REM column A is 0, column B is 1, etc.
REM Sort column B (column 1) descending.
oSortFields(0).Field = 1
oSortFields(0).SortAscending = FALSE
REM If column B has two cells with the same value,
REM then use column A ascending to decide the order.
oSortFields(1).Field = 0
oSortFields(1).SortAscending = True
REM Setup the sort descriptor.
oSortDesc(0).Name = "SortFields"
oSortDesc(0).Value = oSortFields()
REM Sort the range.
oCellRange.Sort(oSortDesc())
End Sub
Chapter 12 Calc Macros 355
Vista de pagina 354
1 2 ... 350 351 352 353 354 355 356 357 358 359 360 ... 496 497

Comentarios a estos manuales

Sin comentarios

Sharp EL-M332BWH manuály

Uživatelské manuály a uživatelské příručky pro Video Sharp EL-M332BWH.
Poskytujeme 1 manuály pdf Sharp EL-M332BWH ke stažení zdarma podle typů dokumentů: Uživatelský manuál


Sharp EL-M332BWH Uživatelský manuál (2 strany)


Značka: Sharp | Kategorie: Video | Velikost: 0.63 MB |

  

Tabulka s obsahem





Další produkty a příručky pro Video Sharp

Modely Typ Dokumentu
EL-520XB Uživatelský manuál   Sharp EL-520XB Manuale d'uso, 2 stránky
EL-1750PIIIGY Uživatelský manuál   Sharp EL-1750PIIIGY Manuale d'uso, 2 stránky
MX-C300P Uživatelský manuál   Sharp MX-C300P Manuale d'uso, 44 stránky
MX-C380P Uživatelský manuál    Sharp MX-C380P Manuale d'uso, 2 stránky
EL233SB Uživatelský manuál    Sharp EL233SB Manuale d'uso, 2 stránky
DX-C200P Uživatelský manuál   Sharp DX-C200P Manuale d'uso, 4 stránky
AR-5620N Uživatelský manuál   Инструкция по эксплуатации Sharp AR-5620N, 2 stránky
AR-5620N Uživatelský manuál   Инструкция по эксплуатации Sharp AR-5620N, 2 stránky
XL-UH12H Uživatelský manuál   Инструкция по эксплуатации Sharp XL-UH12H, 2 stránky
GX-BT3 Uživatelský manuál   Инструкция по эксплуатации Sharp GX-BT3, 2 stránky
MX-M202D Uživatelský manuál   Инструкция по эксплуатации Sharp MX-M202D, 2 stránky
MX-C301W Uživatelský manuál   Sharp MX-C301W Benutzerhandbuch, 44 stránky
LC-24LE250E-BK Uživatelský manuál   Sharp LC-24LE250E-BK Benutzerhandbuch, 27 stránky
MX-M202D Uživatelský manuál   Sharp MX-M202D Benutzerhandbuch, 12 stránky
DX-C200P Uživatelský manuál   Sharp DX-C200P Benutzerhandbuch, 160 stránky
XL-DAB151PHS Uživatelský manuál   Sharp XL-DAB151PHS Benutzerhandbuch, 48 stránky
XL-UH12H Uživatelský manuál   Sharp XL-UH12H Benutzerhandbuch, 16 stránky
EL-W200E Uživatelský manuál   Sharp EL-W200E Benutzerhandbuch, 2 stránky
RZ-X750 Uživatelský manuál    Sharp RZ-X750 Benutzerhandbuch, 2 stránky
XL-HF302PHT Uživatelský manuál   Sharp XL-HF302PHT Benutzerhandbuch, 2 stránky