Filtra gli oggetti durante il caricamento della cartella di lavoro in GridDesktop
Contents
[
Hide
]
Possibili scenari di utilizzo
Si prega di utilizzareGridDesktop.LoadDataFilterproperty durante il filtraggio dei dati dalla cartella di lavoro.
IlGridLoadDataFilterOptionsenumerazione ha i seguenti valori.
- Tutti
- Impostazioni libro
- CellBlank
- CellBool
- CellData
- CellError
- CellNumeric
- CellString
- CellValue
- Grafico
- Formattazione condizionale
- Convalida dei dati
- Nomi definiti
- Proprietà documento
- Formula
- Collegamenti ipertestuali
- Area unita
- Tabella pivot
- Impostazioni
- Forma
- FoglioDati
- Impostazioni foglio
- Struttura
- Stile
- Tavolo
- VBA
- XmlMap
Filtra i dati durante il caricamento della cartella di lavoro
Il codice di esempio seguente illustra come filtrare il disegno dalla cartella di lavoro. Si prega di controllarefile excel di esempio . Come puoi vedere, tutti i grafici/forme/immagini sono stati filtrati dalla cartella di lavoro.
Codice d’esempio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Filter all drawing objects(including Chart, Picture, OleObject and all other drawing objects) from the workbook. | |
gridDesktop1.LoadDataFilter = GridLoadDataFilterOptions.All&~GridLoadDataFilterOptions.Drawing; | |
//here is another example ,if we want to filter to show styles and values only, we can use the below code ,notice here we use | | |
// gridDesktop1.LoadDataFilter = GridLoadDataFilterOptions.CellValue | GridLoadDataFilterOptions.Style; | |
gridDesktop1.ImportExcelFile("5472489.xlsx"); | |