Value: Variant;
The Value property determines value of a cell range.
On changing the range value, text is also changed. If formatted text is set for the range, the Value property can be used to get its actual string view without taking formatting into account.
The Value property value of the cell, for which editor is determined, is checked before setting if it corresponds to editor data type. The value that does not corresponds to editor data type is not set. The editor is determined by the ITabCellStyle.Binding property.
Executing the example requires that the repository contains a regular report with the REG_REP identifier.
Add links to the Metabase, Report, Tab system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Regrep: IPrxReport;
Sheet: IPrxSheet;
Table: IPrxTable;
Tsheet: ITabSheet;
Column: ITabRange;
i: Integer = 0;
Begin
// Get current repository
MB := MetabaseClass.Active;
// Get regular report
Regrep := MB.ItemById("REG_REP").Edit As IPrxReport;
// Get regular report sheet table
Sheet := Regrep.Activesheet;
Table := Sheet As IPrxTable;
TSheet := Table.TabSheet;
// Fill (A0:J9) cell range with data
While (i <= 9) Do
Column := Tsheet.Cells(0, i, 9, i);
i := i + 1;
Column.Value := i;
End While;
(Regrep As IMetabaseObject).Save;
End Sub UserProc;
After executing the example cells of the (A0:J9) range are filled with numbers from 1 to 10.
See also: