Filtering Workbook Data

Executing the example requires that the repository contains a workbook with the OBJ123 identifier the series of which are filtered to hide empty values. Add links to the system assemblies:

Fore Example

Sub UserProc;
Var
    MB: IMetabase;
    CrInfo: IMetabaseObjectCreateInfo;
    MObj: IMetabaseObject;
    Exp: IEaxAnalyzer;
    WB: ILaner;
    Filter: ILanerFilter;
Begin
    MB := MetabaseClass.Active;
    //Open a workbook to edit
    MObj := MB.ItemById("OBJ123").Edit;
    Exp := MObj As IEaxAnalyzer;
    WB := Exp.Laner;
    Filter := WB.Filter;
    //Set filter used to hide empty values
    Filter.SuppressEmpty := True;
    //The cells are hidden both from the series ends and within the series data
    Filter.SuppressEmptyArea := LnSuppressEmptyArea.FullSerie;
    MObj.Save;
End Sub UserProc;

After executing the example the workbook series are filtered to hide empty values. Empty values in the series ends and within the series are hidden.

Fore.NET Example

The defined procedure is the Main entry point in the Program module of the .NET assembly. The Express, Metabase, Laner system assemblies must be imported to this module from the Prognoz.Platform.Interop system assembly.

Public Shared Sub Main(Params: StartParams);

Var
    MB: IMetabase;
    CrInfo: IMetabaseObjectCreateInfo;
    MObj: IMetabaseObject;
    Exp: IEaxAnalyzer;
    WB: ILaner;
    Filter: ILanerFilter;
Begin
    MB := Params.Metabase;
    //Open a workbook to edit
    MObj := MB.ItemById["OBJ123"].Edit();
    Exp := MObj As IEaxAnalyzer;
    WB := Exp.Laner;
    Filter := WB.Filter;
    //Set filter used to hide empty values
    Filter.SuppressEmpty := True;
    //The cells are hidden both from the series ends and within the series data
    Filter.SuppressEmptyArea := LnSuppressEmptyArea.lseaFullSerie;
    MObj.Save();
End Sub;

The result of example execution matches with that of the Fore example.

See also:

Examples | ILaner | ILanerFilter | LnSuppressEmptyArea