IPrxFormulaIslands.Add

Syntax

Add: IPrxFormulaIsland;

Description

The Add method adds formula areas.

Example

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Report: IPrxReport;

FormulaIs: IPrxFormulaIslands;

Formula: IPrxFormulaIsland;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemById("Report").Edit;

Report := MObj As IPrxReport;

FormulaIs := Report.FormulaIslands;

Formula := FormulaIs.Add;

Formula.Sheet := Report.ActiveSheet;

Formula.Origin := Report.ActiveSheet.Table.Cell(0,2);

Formula.Range := Report.ActiveSheet.Table.Cells(0,2,5,7);

Formula.Formula := "a0+b0";

MObj.Save;

End Sub Main;

After executing the example a formula area is created on the active sheet of the regular report. Base cell: C0, cell range: C0-H5, formula: a0+b0. The identifier of the regular report - Report.

See also:

IPrxFormulaIslands