public class LoadFilter
extends java.lang.Object
Remarks
User may specify the filter options or implement their own LoadFilter to specify how to load data.Example
The following example shows how to determine the filter options according to worksheet's properties.
class LoadFilterSheet extends LoadFilter
{
public /*override*/ void startSheet(Worksheet sheet)
{
if ("Sheet1".equals(sheet.getName()))
{
setLoadDataFilterOptions(LoadDataFilterOptions.ALL);
}
else
{
setLoadDataFilterOptions(LoadDataFilterOptions.STRUCTURE);
}
}
}
LoadOptions opts = new LoadOptions();
opts.setLoadFilter(new LoadFilterSheet());
Workbook wb = new Workbook("template.xlsx", opts);
//Custom LoadFilter implementation
| Constructor and Description |
|---|
LoadFilter()
Constructs one LoadFilter with default filter options LoadDataFilterOptions.All.
|
LoadFilter(int opts)
Constructs one LoadFilter with given filter options.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getLoadDataFilterOptions()
The filter options to denote what data should be loaded.
|
int[] |
getSheetsInLoadingOrder()
Specifies the sheets(indices) and order to be loaded.
|
void |
setLoadDataFilterOptions(int value)
The filter options to denote what data should be loaded.
|
void |
startSheet(Worksheet sheet)
Prepares filter options before loading given worksheet.
|
public LoadFilter()
public LoadFilter(int opts)
opts - LoadDataFilterOptions. the default filter optionspublic int getLoadDataFilterOptions()
public void setLoadDataFilterOptions(int value)
public int[] getSheetsInLoadingOrder()
public void startSheet(Worksheet sheet)
sheet - The worksheet to be loaded.
There are only few properties can be used for the given worksheet object here
because most data and properties have not been loaded. The available properties are:
Name, Index, VisibilityTypeSee Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.