Filter Objects while loading Workbook or Worksheet

Possible Usage Scenarios

Please use the LoadOptions.load_filter property when filtering data from the workbook. However, if you want to filter data from individual worksheets, you will need to override the LoadFilter.start_sheet method. Please provide an appropriate value from the LoadDataFilterOptions enumeration while creating or working with LoadFilter.

The LoadDataFilterOptions enumeration has the following possible values.

  • All
  • BookSettings
  • CellBlank
  • CellBool
  • CellData
  • CellError
  • CellNumeric
  • CellString
  • CellValue
  • Chart
  • ConditionalFormatting
  • DataValidation
  • DefinedNames
  • DocumentProperties
  • Formula
  • Hyperlinks
  • MergedArea
  • PivotTable
  • Settings
  • Shape
  • SheetData
  • SheetSettings
  • Structure
  • Style
  • Table
  • VBA
  • XmlMap

Filter Objects while Loading a Workbook

The following sample code illustrates how to filter charts from the workbook. Please check the sample Excel file (5115258.xlsx) used in this code and the output PDF (5115257.pdf) generated by it. As you can see in the output PDF, all charts have been filtered out of the workbook.