CanEdit: Boolean;
The CanEdit property returns whether a table can be edited.
Available values:
True. A table can be edited.
False. A table cannot be edited.
To open a table in the edit mode, use the IPivotTable.Edit method.
To exit the edit mode and save changed table data, use the IPivotTable.Post method; to do the same but without saving changed data, use the IPivotTable.Cancel method.
Executing the example requires that the repository contains an express report with the EXPRESS identifier. The report should contain a table.
Add links to the Express, Metabase and Pivot system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Pivot: IPivot;
Table: IPivotTable;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get table display settings
Pivot := Express.Pivot;
Table := Pivot.ObtainTable;
// Check if table can be edited
If Pivot.CanEdit Then
// Open table in edit mode if it cannot be edited
Table.Edit;
End If;
// Change cell value with the (1,2) coordinate
Table.Cell(1, 2) := 100;
// Save changed table data and refresh table
Table.Post;
Pivot.Refresh;
End Sub UserProc;
After executing the example, cell value with the (1,2) coordinate is changed to 100 in the express report table.
See also: