LanerTable: ILanerTable;
LanerTable: Prognoz.Platform.Interop.Laner.ILanerTable;
The LanerTable property returns the data table from the time series database workbook.
To obtain the workbook use the IEaxAnalyzer.Laner property.
Executing the example requires the workbook with the WORKBOOK identifier, containing data seires in the repository.
Add links to the Express, Laner, MathFin, Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
WbkObj: IMetabaseObject;
EaxAn: IEaxAnalyzer;
LanerTbl: ILanerTable;
i, j: Integer;
Begin
// Get workbook
mb := MetabaseClass.Active;
WbkObj := mb.ItemById("WORKBOOK").Edit;
EaxAn := WbkObj As IEaxAnalyzer;
// Obtain workbook table
LanerTbl := EaxAn.LanerTable;
// Switch the table to edit mode
If Not LanerTbl.IsEditing Then
LanerTbl.Edit;
End If;
// Fill the table with arbitrary numbers
For i := 0 To LanerTbl.RowCount - 1 Do
For j := 0 To LanerTbl.ColumnCount - 1 Do
If LanerTbl.IsEditableCell(i, j) Then
LanerTbl.Cell(i, j) := Math.RandBetween(0, 100);
End If;
End For;
End For;
// Exit the edit mode with saving the data
LanerTbl.Post;
WbkObj.Save;
End Sub UserProc;
As a result of example execution the data in the workbook will be replaced by arbitrary numbers.
The requirements and result of Fore.NET Example execution are the same as in the Fore Example.
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Laner;
Imports Prognoz.Platform.Interop.MathFin;
…
Public Shared Sub Main(Params: StartParams);
Var
mb: IMetabase;
WbkObj: IMetabaseObject;
EaxAn: IEaxAnalyzer;
LanerTbl: ILanerTable;
i, j: Integer;
Math: MathClass = New MathClass.Create();
Begin
// Get workbook
mb := Params.Metabase;
WbkObj := mb.ItemById["WORKBOOK"].Edit();
EaxAn := WbkObj As IEaxAnalyzer;
// Obtain workbook table
LanerTbl := EaxAn.LanerTable;
// Switch the table to edit mode
If Not LanerTbl.IsEditing Then
LanerTbl.Edit();
End If;
// Fill the table with arbitrary numbers
For i := 0 To LanerTbl.RowCount - 1 Do
For j := 0 To LanerTbl.ColumnCount - 1 Do
If LanerTbl.IsEditableCell[i, j] Then
LanerTbl.Cell[i, j] := Math.RandBetween(0, 100);
End If;
End For;
End For;
// Exit the edit mode with saving the data
LanerTbl.Post();
WbkObj.Save();
End Sub;
See also: