LoadFilter Class
Represents the filter that provides options for loading data when loading workbook from template.
Inheritance Hierarchy
SystemObject
  Aspose.CellsLoadFilter

Namespace: Aspose.Cells
Assembly: Aspose.Cells (in Aspose.Cells.dll) Version: 19.11.0.0 (19.11)
Syntax
public class LoadFilter

The LoadFilter type exposes the following members.

Constructors
  NameDescription
Public methodLoadFilter
Constructs one LoadFilter with default filter options LoadDataFilterOptions.All.
Public methodLoadFilter(LoadDataFilterOptions)
Constructs one LoadFilter with given filter options.
Properties
  NameDescription
Public propertyLoadDataFilterOptions
The filter options to denote what data should be loaded.
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStartSheet
Prepares filter options before loading given worksheet. User's implementation of LoadFilter can change the LoadDataFilterOptions here to denote how to load data for this worksheet.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Remarks
User may specify the filter options or implement their own LoadFilter to specify how to load data.
Examples
The following example shows how to determine the filter options according to worksheet's properties.
[C#]
Workbook wb = new Workbook(template, new LoadOptions() { LoadFilter = new LoadFilterSheet() });
//Custom LoadFilter implementation
class LoadFilterSheet : LoadFilter
{
    public override void StartSheet(Worksheet sheet) 
    {
        if (sheet.Name == "Sheet1")
        {
            LoadDataFilterOptions = Aspose.Cells.LoadDataFilterOptions.All;
        }
        else
        {
            LoadDataFilterOptions = Aspose.Cells.LoadDataFilterOptions.None;
        }
    }
}
See Also