com.aspose.cells
Classes 
AboveAverage
AbstractCalculationEngine
AbstractCalculationMonitor
AbstractGlobalizationSettings
AbstractInterruptMonitor
AbstractTextLoadOptions
ActiveXControl
ActiveXControlBase
ArcShape
Area
AutoFilter
AutoFitterOptions
AutomaticFill
AutoNumberedBulletValue
Axis
AxisBins
BaseShapeGuide
Bevel
Border
BorderCollection
BuiltInDocumentPropertyCollection
Bullet
BulletValue
Button
CalculationCell
CalculationData
CalculationOptions
Cell
CellArea
Cells
CellsColor
CellsDataTableFactory
CellsDrawing
CellsException
CellsFactory
CellsHelper
CellWatch
CellWatchCollection
CharacterBulletValue
Chart
ChartArea
ChartCollection
ChartDataTable
ChartFrame
ChartGlobalizationSettings
ChartPoint
ChartPointCollection
ChartShape
ChartTextFrame
CheckBox
CheckBoxActiveXControl
CheckBoxCollection
CollectionBase
Color
ColorFilter
ColorHelper
ColorScale
Column
ColumnCollection
ComboBox
ComboBoxActiveXControl
CommandButtonActiveXControl
Comment
CommentCollection
CommentShape
ConditionalFormattingCollection
ConditionalFormattingIcon
ConditionalFormattingIconCollection
ConditionalFormattingResult
ConditionalFormattingValue
ConditionalFormattingValueCollection
ConnectionParameter
ConnectionParameterCollection
ContentTypeProperty
ContentTypePropertyCollection
CopyOptions
CustomDocumentPropertyCollection
CustomFilter
CustomFilterCollection
CustomGeometry
CustomImplementationFactory
CustomProperty
CustomPropertyCollection
CustomXmlPart
CustomXmlPartCollection
CustomXmlShape
DataBar
DataBarBorder
DataLabels
DataSorter
DataSorterKey
DataSorterKeyCollection
DateTime
DateTimeGroupItem
DBConnection
DefaultStyleSettings
DeleteOptions
DialogBox
DifSaveOptions
DigitalSignature
DigitalSignatureCollection
DisplayUnitLabel
DocumentProperty
DocumentPropertyCollection
DocxSaveOptions
DrawObject
DrawObjectEventHandler
DropBars
DxfCollection
DynamicFilter
Encoding
ErrorBar
ErrorCheckOption
ErrorCheckOptionCollection
ExportObjectEvent
ExportRangeToJsonOptions
ExportTableOptions
ExternalConnection
ExternalConnectionCollection
ExternalLink
ExternalLinkCollection
FileFontSource
FileFormatInfo
FileFormatUtil
Fill
FillFormat
FilterColumn
FilterColumnCollection
FindOptions
Floor
FolderFontSource
Font
FontConfigs
FontSetting
FontSettingCollection
FontSourceBase
Format3D
FormatCondition
FormatConditionCollection
FormulaParseOptions
FormulaSettings
Geometry
GlobalizationSettings
GlowEffect
GradientFill
GradientStop
GradientStopCollection
GroupBox
GroupFill
GroupShape
HeaderFooterCommand
HorizontalPageBreak
HorizontalPageBreakCollection
HtmlLoadOptions
HtmlSaveOptions
Hyperlink
HyperlinkCollection
IconFilter
IconSet
ImageActiveXControl
ImageFormat
ImageOrPrintOptions
ImageSaveOptions
ImportTableOptions
IndividualFontConfigs
InsertOptions
InterruptMonitor
JsonLayoutOptions
JsonLoadOptions
JsonSaveOptions
JsonUtility
Label
LabelActiveXControl
Legend
LegendEntry
LegendEntryCollection
License
Line
LineFormat
LineShape
ListBox
ListBoxActiveXControl
ListColumn
ListColumnCollection
ListObject
ListObjectCollection
LoadFilter
LoadOptions
MarkdownSaveOptions
Marker
MemoryFontSource
MetadataOptions
Metered
MsoFillFormat
MsoFillFormatHelper
MsoFormatPicture
MsoLineFormat
MsoLineFormatHelper
MsoTextFrame
MultipleFilterCollection
Name
NameCollection
NegativeBarFormat
NoneBulletValue
NoneFill
OdsCellField
OdsCellFieldCollection
OdsLoadOptions
OdsPageBackground
OdsSaveOptions
OleObject
OleObjectCollection
OoxmlSaveOptions
Outline
Oval
PageEndSavingArgs
PageSavingArgs
PageSetup
PageStartSavingArgs
PaneCollection
PasteOptions
PatternFill
PdfBookmarkEntry
PdfSaveOptions
PdfSecurityOptions
PicFormatOption
Picture
PictureBulletValue
PictureCollection
PivotField
PivotFieldCollection
PivotFilter
PivotFilterCollection
PivotFormatCondition
PivotFormatConditionCollection
PivotItem
PivotItemCollection
PivotOptions
PivotPageFields
PivotTable
PivotTableCollection
PlotArea
PptxSaveOptions
ProtectedRange
ProtectedRangeCollection
Protection
QueryTable
QueryTableCollection
RadioButton
RadioButtonActiveXControl
Range
RangeCollection
RectangleShape
ReferredArea
ReferredAreaCollection
ReflectionEffect
ReplaceOptions
Revision
RevisionAutoFormat
RevisionCellChange
RevisionCellComment
RevisionCellMove
RevisionCollection
RevisionCustomView
RevisionDefinedName
RevisionFormat
RevisionInsertDelete
RevisionInsertSheet
RevisionLog
RevisionLogCollection
RevisionMergeConflict
RevisionQueryTable
RevisionRenameSheet
Row
RowCollection
SaveOptions
Scenario
ScenarioCollection
ScenarioInputCell
ScenarioInputCellCollection
ScrollBar
ScrollBarActiveXControl
Series
SeriesCollection
SeriesLayoutProperties
ShadowEffect
Shape
ShapeCollection
ShapeFormat
ShapeGuide
ShapeGuideCollection
ShapePath
ShapePathCollection
ShapePathPoint
ShapePathPointCollection
ShapePropertyCollection
ShapeSegmentPath
ShapeSegmentPathCollection
ShapeTextAlignment
SheetPrintingPreview
SheetRender
SignatureLine
Slicer
SlicerCache
SlicerCacheItem
SlicerCacheItemCollection
SlicerCollection
SmartArtShape
SmartTag
SmartTagCollection
SmartTagOptions
SmartTagProperty
SmartTagPropertyCollection
SmartTagSetting
SolidFill
Sparkline
SparklineCollection
SparklineGroup
SparklineGroupCollection
SpinButtonActiveXControl
Spinner
SpreadsheetML2003SaveOptions
StreamProviderOptions
Style
StyleFlag
SubtotalSetting
SvgSaveOptions
SxRng
TableStyle
TableStyleCollection
TableStyleElement
TableStyleElementCollection
TableToRangeOptions
TextBox
TextBoxActiveXControl
TextBoxCollection
TextEffectFormat
TextOptions
TextParagraph
TextParagraphCollection
TextTabStop
TextTabStopCollection
TextureFill
ThemeColor
ThreadedComment
ThreadedCommentAuthor
ThreadedCommentAuthorCollection
ThreadedCommentCollection
ThreeDFormat
TickLabelItem
TickLabels
TilePicOption
Timeline
TimelineCollection
Title
ToggleButtonActiveXControl
Top10
Top10Filter
Trendline
TrendlineCollection
TxtLoadOptions
TxtSaveOptions
UnionRange
UnknownControl
Validation
ValidationCollection
VbaModule
VbaModuleCollection
VbaProject
VbaProjectReference
VbaProjectReferenceCollection
VerticalPageBreak
VerticalPageBreakCollection
VmlShapeGuide
Walls
WarningInfo
WebExtension
WebExtensionBinding
WebExtensionBindingCollection
WebExtensionCollection
WebExtensionProperty
WebExtensionPropertyCollection
WebExtensionReference
WebExtensionReferenceCollection
WebExtensionShape
WebExtensionTaskPane
WebExtensionTaskPaneCollection
WebQueryConnection
Workbook
WorkbookDesigner
WorkbookMetadata
WorkbookPrintingPreview
WorkbookRender
WorkbookSettings
Worksheet
WorksheetCollection
WriteProtection
XlsbSaveOptions
XlsSaveOptions
XmlColumnProperty
XmlDataBinding
XmlLoadOptions
XmlMap
XmlMapCollection
XmlSaveOptions
XpsSaveOptions
Interfaces 
ICellsDataTable
ICustomFunction
ICustomParser
IExportObjectListener
IFilePathProvider
IPageSavingCallback
ISmartMarkerCallBack
IStreamProvider
IWarningCallback
LightCellsDataHandler
LightCellsDataProvider
Constants 
AccessCacheOptions
ActiveXPersistenceType
AutoFillType
AutoFitMergedCellsType
AutoFitWrappedTextType
AutoShapeType
AxisType
BackgroundMode
BackgroundType
Bar3DShapeType
BevelPresetType
BevelType
BorderType
BubbleSizeRepresents
BuiltinStyleType
BulletType
CalcModeType
CalculationPrecisionStrategy
CategoryType
CellBorderType
CellValueFormatStrategy
CellValueType
ChartLineFormattingType
ChartMarkerType
ChartSplitType
ChartTextDirectionType
ChartType
CheckValueType
ColorDepth
ColorType
CommentTitleType
ConnectionDataSourceType
ConnectionParameterType
ConsolidationFunction
ControlBorderType
ControlCaptionAlignmentType
ControlListStyle
ControlMatchEntryType
ControlMousePointerType
ControlPictureAlignmentType
ControlPicturePositionType
ControlPictureSizeMode
ControlScrollBarType
ControlScrollOrientation
ControlSpecialEffectType
ControlType
CopyFormatType
CountryCode
CredentialsMethodType
CrossType
DataBarAxisPosition
DataBarBorderType
DataBarFillType
DataBarNegativeColorType
DataLabelShapeType
DataLabelsSeparatorType
DataLablesSeparatorType
DateTimeGroupingType
DefaultEditLanguage
DirectoryType
DisplayDrawingObjects
DisplayUnitType
DrawObjectEnum
DropButtonStyle
DynamicFilterType
EmfRenderSetting
EncryptionType
ErrorBarDisplayType
ErrorBarType
ErrorCheckType
ExceptionType
ExternalLinkType
FileFormatType
FillPattern
FillPictureType
FillType
FilterOperatorType
FilterType
FontSchemeType
FontSourceType
FontUnderlineType
FormatConditionType
FormatConditionValueType
FormatSetType
FormattingType
GradientColorType
GradientDirectionType
GradientFillType
GradientPresetType
GradientStyleType
GridlineType
HeaderFooterCommandType
HtmlCrossType
HtmlExportDataOptions
HtmlFormatHandlingType
HtmlHiddenColDisplayType
HtmlHiddenRowDisplayType
HtmlLinkTargetType
IconSetType
ImageType
InputMethodEditorMode
LabelPositionType
LegendPositionType
LightRigDirectionType
LightRigType
LineCapType
LineJoinType
LineSpaceSizeType
LineType
LoadDataFilterOptions
LoadFormat
LookAtType
LookInType
MapChartLabelLayout
MapChartProjectionType
MapChartRegionType
MemorySetting
MetadataType
MirrorType
MsoArrowheadLength
MsoArrowheadStyle
MsoArrowheadWidth
MsoDrawingType
MsoLineDashStyle
MsoLineStyle
MsoPresetTextEffect
MsoPresetTextEffectShape
NameScopeType
NumberCategoryType
OdsCellFieldType
OdsGeneratorType
OdsPageBackgroundGraphicPositionType
OdsPageBackgroundGraphicType
OdsPageBackgroundType
OLEDBCommandType
OoxmlCompliance
OoxmlCompressionType
OperatorType
PageLayoutAlignmentType
PageOrientationType
PaneStateType
PaperSizeType
ParameterType
PasteOperationType
PasteType
PdfCompliance
PdfCompressionCore
PdfCustomPropertiesExport
PdfFontEncoding
PdfOptimizationType
PivotConditionFormatRuleType
PivotConditionFormatScopeType
PivotFieldDataDisplayFormat
PivotFieldSubtotalType
PivotFieldType
PivotFilterType
PivotGroupByType
PivotItemPosition
PivotMissingItemLimitType
PivotTableAutoFormatType
PivotTableStyleType
PlacementType
PlotDataByType
PlotEmptyCellsType
PresetCameraType
PresetMaterialType
PresetShadowType
PresetWordArtStyle
PrintCommentsType
PrintErrorsType
PrintingPageType
PrintOrderType
PrintSizeType
PropertyType
ProtectionType
QuartileCalculationType
ReConnectionMethodType
RectangleAlignmentType
ReflectionEffectType
RenameStrategy
ResourceLoadingType
RevisionActionType
RevisionType
SaveFormat
SelectionType
ShapeAnchorType
ShapeLockType
ShapePathType
SheetType
ShiftType
ShowDropButtonType
SlicerCacheCrossFilterType
SlicerCacheItemSortType
SlicerStyleType
SmartTagShowType
SortOnType
SortOrder
SparklineAxisMinMaxType
SparklinePresetStyleType
SparklineType
SqlDataType
StyleModifyFlag
TableDataSourceType
TableStyleElementType
TableStyleType
TargetModeType
TextAlignmentType
TextAutonumberScheme
TextCapsType
TextCrossType
TextDirectionType
TextFontAlignType
TextNodeType
TextOrientationType
TextOverflowType
TextStrikeType
TextTabAlignmentType
TextureType
TextVerticalType
ThemeColorType
TickLabelPositionType
TickMarkType
TiffCompression
TimePeriodType
TimeUnit
TotalsCalculation
TrendlineType
TxtLoadStyleStrategy
TxtValueQuoteType
UpdateLinksType
ValidationAlertType
ValidationType
VbaModuleType
VbaProjectReferenceType
ViewType
VisibilityType
WarningType
WebExtensionStoreType
WeightType
XAdESType

com.aspose.cells
Class AutoFilter

java.lang.Object
    extended by com.aspose.cells.AutoFilter

public class AutoFilter 
extends java.lang.Object

Represents autofiltering for the specified worksheet.

Example:

//Creating a file stream containing the Excel file to be opened
//Instantiating a Workbook object
Workbook workbook = new Workbook("template.xlsx");
//Accessing the first worksheet in the Excel file
Worksheet worksheet = workbook.getWorksheets().get(0);
//Creating AutoFilter by giving the cells range of the heading row
worksheet.getAutoFilter().setRange("A1:B1");
//Filtering columns with specified values
worksheet.getAutoFilter().filter(1, "Bananas");
//Saving the modified Excel file.
workbook.save("output.xls");


Property Getters/Setters Summary
FilterColumnCollectiongetFilterColumns()
           Gets the collection of the filter columns.
java.lang.StringgetRange()
voidsetRange(java.lang.String)
           Represents the range to which the specified AutoFilter applies.
booleangetShowFilterButton()
voidsetShowFilterButton(boolean)
           Indicates whether the AutoFilter button for this column is visible.
DataSortergetSorter()
           Gets the data sorter.
 
Method Summary
voidaddDateFilter(int fieldIndex, int dateTimeGroupingType, int year, int month, int day, int hour, int minute, int second)
           Adds a date filter.
voidaddFillColorFilter(int fieldIndex, int pattern, CellsColor foregroundColor, CellsColor backgroundColor)
           Adds a fill color filter.
voidaddFilter(int fieldIndex, java.lang.String criteria)
           Adds a filter for a filter column.
voidaddFontColorFilter(int fieldIndex, CellsColor color)
           Adds a font color filter.
voidaddIconFilter(int fieldIndex, int iconSetType, int iconId)
           Adds an icon filter.
voidcustom(int fieldIndex, int operatorType1, java.lang.Object criteria1)
           Filters a list with a custom criteria.
voidcustom(int fieldIndex, int operatorType1, java.lang.Object criteria1, boolean isAnd, int operatorType2, java.lang.Object criteria2)
           Filters a list with custom criteria.
voiddynamicFilter(int fieldIndex, int dynamicFilterType)
           Adds a dynamic filter.
voidfilter(int fieldIndex, java.lang.String criteria)
           Filters a list with specified criteria.
voidfilterTop10(int fieldIndex, boolean isTop, boolean isPercent, int itemCount)
           Filter the top 10 item in the list
CellAreagetCellArea()
           Gets the CellArea where the specified AutoFilter applies to.
voidmatchBlanks(int fieldIndex)
           Match all blank cell in the list.
voidmatchNonBlanks(int fieldIndex)
           Match all not blank cell in the list.
int[]refresh()
           Refresh auto filters to hide or unhide the rows.
int[]refresh(boolean hideRows)
           Gets all hidden rows' indexes.
voidremoveDateFilter(int fieldIndex, int dateTimeGroupingType, int year, int month, int day, int hour, int minute, int second)
           Removes a date filter.
voidremoveFilter(int fieldIndex)
           Remove the specific filter.
voidremoveFilter(int fieldIndex, java.lang.String criteria)
           Removes a filter for a filter column.
voidsetRange(int row, int startColumn, int endColumn)
           Sets the range to which the specified AutoFilter applies.
voidshowAll()
           Unhide all rows.
 

Property Getters/Setters Detail

getSorter

public DataSorter getSorter()
Gets the data sorter.

getRange/setRange

public java.lang.String getRange() / public void setRange(java.lang.String value)
Represents the range to which the specified AutoFilter applies.

getShowFilterButton/setShowFilterButton

public boolean getShowFilterButton() / public void setShowFilterButton(boolean value)
Indicates whether the AutoFilter button for this column is visible.

getFilterColumns

public FilterColumnCollection getFilterColumns()
Gets the collection of the filter columns.

Method Detail

setRange

public void setRange(int row, int startColumn, int endColumn)
Sets the range to which the specified AutoFilter applies.
Parameters:
row - Row index.
startColumn - Start column index.
endColumn - End column Index.

getCellArea

public CellArea getCellArea()
Gets the CellArea where the specified AutoFilter applies to.
Returns:

addFilter

public void addFilter(int fieldIndex, java.lang.String criteria)
Adds a filter for a filter column. MS Excel 2007 supports multiple selection in a filter column.
Parameters:
fieldIndex - The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0).
criteria - The specified criteria (a string; for example, "101"). It only can be null or be one of the cells' value in this column.

addDateFilter

public void addDateFilter(int fieldIndex, int dateTimeGroupingType, int year, int month, int day, int hour, int minute, int second)
Adds a date filter. If DateTimeGroupingType is Year, only the param year effects. If DateTiemGroupingType is Month, only the param year and month effect.
Parameters:
fieldIndex - The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0).
dateTimeGroupingType - A DateTimeGroupingType value. DateTimeGroupingType
year - The year.
month - The month.
day - The day.
hour - The hour.
minute - The minute.
second - The second.

removeDateFilter

public void removeDateFilter(int fieldIndex, int dateTimeGroupingType, int year, int month, int day, int hour, int minute, int second)
Removes a date filter. If DateTimeGroupingType is Year, only the param year effects. If DateTiemGroupingType is Month, only the param year and month effect.
Parameters:
fieldIndex - The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0).
dateTimeGroupingType - A DateTimeGroupingType value. DateTimeGroupingType
year - The year.
month - The month.
day - The day.
hour - The hour.
minute - The minute.
second - The second.

removeFilter

public void removeFilter(int fieldIndex, java.lang.String criteria)
Removes a filter for a filter column.
Parameters:
fieldIndex - The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0).
criteria - The specified criteria (a string; for example, "101"). It only can be null or be one of the cells' value in this column.

filter

public void filter(int fieldIndex, java.lang.String criteria)
Filters a list with specified criteria. Aspose.Cells will remove all other filter setting on this field as Ms Excel 97-2003.
Parameters:
fieldIndex - The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0).
criteria - The specified criteria (a string; for example, "101").

filterTop10

public void filterTop10(int fieldIndex, boolean isTop, boolean isPercent, int itemCount)
Filter the top 10 item in the list
Parameters:
fieldIndex - The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0).
isTop - Indicates whether filter from top or bottom
isPercent - Indicates whether the items is percent or count
itemCount - The item count

dynamicFilter

public void dynamicFilter(int fieldIndex, int dynamicFilterType)
Adds a dynamic filter.
Parameters:
fieldIndex - The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0).
dynamicFilterType - A DynamicFilterType value. Dynamic filter type.

addFontColorFilter

public void addFontColorFilter(int fieldIndex, CellsColor color)
Adds a font color filter.
Parameters:
fieldIndex - The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0).
color - The CellsColor object.

addFillColorFilter

public void addFillColorFilter(int fieldIndex, int pattern, CellsColor foregroundColor, CellsColor backgroundColor)
Adds a fill color filter.
Parameters:
fieldIndex - The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0).
pattern - A BackgroundType value. The background pattern type.
foregroundColor - The foreground color.
backgroundColor - The background color.

addIconFilter

public void addIconFilter(int fieldIndex, int iconSetType, int iconId)
Adds an icon filter. Only supports to add the icon filter. Not supports checking which row is visible if the filter is icon filter.
Parameters:
fieldIndex - The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0).
iconSetType - A IconSetType value. The icon set type.
iconId - The icon id.

matchBlanks

public void matchBlanks(int fieldIndex)
Match all blank cell in the list.
Parameters:
fieldIndex - The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0).

matchNonBlanks

public void matchNonBlanks(int fieldIndex)
Match all not blank cell in the list.
Parameters:
fieldIndex - The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0).

custom

public void custom(int fieldIndex, int operatorType1, java.lang.Object criteria1)
Filters a list with a custom criteria.
Parameters:
fieldIndex - The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0).
operatorType1 - A FilterOperatorType value. The filter operator type
criteria1 - The custom criteria

custom

public void custom(int fieldIndex, int operatorType1, java.lang.Object criteria1, boolean isAnd, int operatorType2, java.lang.Object criteria2)
Filters a list with custom criteria.
Parameters:
fieldIndex - The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0).
operatorType1 - A FilterOperatorType value. The filter operator type
criteria1 - The custom criteria
isAnd -
operatorType2 - A FilterOperatorType value. The filter operator type
criteria2 - The custom criteria

showAll

public void showAll()
Unhide all rows.

removeFilter

public void removeFilter(int fieldIndex)
Remove the specific filter.
Parameters:
fieldIndex - The specific filter index

refresh

public int[] refresh()
Refresh auto filters to hide or unhide the rows.
Returns:
Returns all hidden rows' indexes.

refresh

public int[] refresh(boolean hideRows)
Gets all hidden rows' indexes.
Parameters:
hideRows - If true, hide the filtered rows.
Returns:
Returns all hidden rows indexes.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.