Page 1 of 1

Export Excel

Posted: Wed Nov 30, 2016 9:08 am
by 16578476
hi,

the Export to Excel doesn't work, we can't open the file.

Re: Export Excel

Posted: Wed Nov 30, 2016 10:15 am
by yeray
Hello,

We implemented in v2016.19 a new way to export to xlsx for Excel > 2013 (in the ticket #1257).
It works as follows:

Code: Select all

uses TeeExcelSource;

procedure TForm2.Button1Click(Sender: TObject);
Var excelExp : TSeriesDataXLSObject;
begin
  excelExp := TSeriesDataXLSObject.Create(TCustomChart(Chart1));
  excelExp.IncludeIndex := true;
  excelExp.IncludeHeader:= true;
  excelExp.IncludeColors := true;
  excelExp.IncludeLabels := true;

  excelExp.SaveToFile('C:\tmp\excel.xlsx');
end;