Hello
You can access
TPivotGridEh.VisPivotGridArray property
or protected TPivotGridEh.PivotGridArray array property to access PivotGrid values.
VisPivotGridArray[c, r] - return grid cell from visible (expanded pivot Rows and Columns) cell array.
PivotGridArray[c, r] - return grid cell from Full cell array.
TPivotCellEh have CelType and Value property.
CelType in [sctDataEh, sctHorzAggregateData, sctVertAggregateData] - cells in Data 'White' area.
Here is example to get values from VisPivotGridArray
Code:
type
TPivotGridEhCrack = class(TPivotGridEh);
procedure TForm1.Button1Click(Sender: TObject);
var
ACell: TPivotCellEh;
c, r: Integer;
s: String;
begin
DBMemoEh1.Clear;
for r := 0 to TPivotGridEhCrack(PivotGridEh1).FullRowCount - 1 do
//for r := 0 to Length(TPivotGridEhCrack(PivotGridEh1).PivotGridArray[0]) - 1 do
begin
for c := 0 to TPivotGridEhCrack(PivotGridEh1).FullColCount - 1 do
//for c := 0 to Length(TPivotGridEhCrack(PivotGridEh1).PivotGridArray) - 1 do
begin
ACell := PivotGridEh1.VisPivotGridArray[c, r];
//ACell := TPivotGridEhCrack(PivotGridEh1).PivotGridArray[c, r];
if (ACell.CelType in [sctDataEh, sctHorzAggregateData, sctVertAggregateData]) then
begin
s := s + VarToStr(ACell.Value) + #09;
end;
end;
DBMemoEh1.Lines.Add(s);
s := '';
end;
end;