FindOptions classe
FindOptions classe
Rappresenta le opzioni di ricerca.
Il tipo FindOptions espone i seguenti membri:
Costruttori
| Costruttore | Descrizione |
|---|---|
__init__(self) | Crea una nuova istanza di FindOptions |
Proprietà
| Proprietà | Descrizione |
|---|---|
| is_case_sensitive | Indica se la stringa cercata distingue tra maiuscole e minuscole. |
| case_sensitive | Indica se la stringa cercata distingue tra maiuscole e minuscole. |
| look_at_type | Guarda il tipo. |
| is_range_set | Indica se l’intervallo cercato è impostato. |
| search_next | Ordine di ricerca. Vero: cerca successivo. Falso: cerca precedente. |
| search_backward | Se cercare le celle all’indietro. |
| seach_order_by_rows | Indica se l’ordine di ricerca è per righe o per colonne. |
| search_order_by_rows | Indica se l’ordine di ricerca è per righe o per colonne. |
| look_in_type | Guarda nel tipo. |
| regex_key | Indica se la chiave cercata è un’espressione regolare. Se vero, la chiave cercata verrà interpretata come espressione regolare e analizzata. Altrimenti la chiave verrà analizzata secondo le regole di MS Excel. |
| value_type_sensitive | Indica se il tipo di valore della cella cercata deve essere lo stesso della chiave cercata. |
| style | Formato da ricercare. |
| convert_numeric_data | Ottiene o imposta un valore che indica se convertire il valore stringa cercato in dati numerici. |
Metodi
| Metodo | Descrizione |
|---|---|
get_range(self) | Ottiene e imposta l’intervallo cercato. |
set_range(self, ca) | Imposta l’intervallo da ricercare. |
Esempio
from aspose.cells import CellArea, FindOptions, LookInType, Workbook
# Instantiate the workbook object
workbook = Workbook("book1.xls")
# Get Cells collection
cells = workbook.worksheets[0].cells
# Instantiate FindOptions Object
findOptions = FindOptions()
# Create a Cells Area
ca = CellArea()
ca.start_row = 8
ca.start_column = 2
ca.end_row = 17
ca.end_column = 13
# Set cells area for find options
findOptions.set_range(ca)
# Set searching properties
findOptions.search_backward = False
findOptions.seach_order_by_rows = True
findOptions.look_in_type = LookInType.VALUES
# Find the cell with 0 value
cell = cells.find(0, None, findOptions)
Guarda anche
- modulo
aspose.cells