i created differnt charts in runtime, how I can add this to the excel file, or how can I connect the created file?
best regards
Dirk Piethan
Hi,
1. You have to use ExcellApp pointer which passed in TPivotGrid.ExportToExcel and after export performed, youmay add your pictures to Excel like
Sheet := Excel.WorkBooks[1].WorkSheets[2];
Sheet.Cells[0,0] := Picture;
or similar.
Alex
Dear Alex,
thanks for your answer. I would like to test your tipp, but at runtime I get same error like this:
EVariantInvalidOpError mit Meldung 'Ungültige Variantenoperation'.
My code are simple:
procedure TForm6.Button4Click(Sender: TObject);
var
Excel, sheet : OleVariant;
begin
PivotGrid1.ExportToExcel(Excel,True,True,True,'Perfomance Übersicht -'+edt_grp.Text+'-');
sheet:= Excel.WorkBooks[1].WorkSheets[2];
end;
If you have more examples for my problem.
Thanks
Dirk Piethan