Bad headers in series exported to Excel format - TeeChart502
Posted: Mon Oct 11, 2004 8:33 am
I have got insufficient column headers when exporting
series data to Excel format.
My computer software configuration is:
- MS Windows 2000 5.00.2195 Service Pack 4
- Borland Delphi Enterprise 6.0 (Build 6.240) Update Pack 2
- TeeChart Pro 5.02
1. I have test program with following code:
-----------------------------------------------------
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, TeEngine, Series, ExtCtrls, TeeProcs, Chart, TeeEdit;
type
TForm1 = class(TForm)
Chart1: TChart;
Series1: TLineSeries;
Series2: TLineSeries;
Series3: TLineSeries;
MainMenu1: TMainMenu;
miChartEditor: TMenuItem;
ChartEditor1: TChartEditor;
procedure miChartEditorClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.miChartEditorClick(Sender: TObject);
begin
with ChartEditor1 do begin
Chart := self.Chart1; Execute;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
var
i: integer;
begin
with Chart1 do
for i := 0 to SeriesCount-1 do begin
Series.Title := Chr( Ord('A')+Ord(i) );
Series.FillSampleValues(3);
end;
end;
end.
-----------------------------------------------------
2. The results of series data export to XML format are:
-----------------------------------------------------
<?xml version="1.0" ?>
<chart>
<series title="A" type="Line">
<points count="3">
<point Y="570"/>
<point Y="497"/>
<point Y="508"/>
</points>
</series>
<series title="B" type="Line">
<points count="3">
<point Y="545"/>
<point Y="538"/>
<point Y="545"/>
</points>
</series>
<series title="C" type="Line">
<points count="3">
<point Y="518"/>
<point Y="517"/>
<point Y="524"/>
</points>
</series>
</chart>
-----------------------------------------------------
3. The results of series data export to Excel format and when
exported from Excel to text format are:
-----------------------------------------------------
Y Y Y
570 545 518
497 538 517
508 545 524
-----------------------------------------------------
So all column headers are "Y".
What can I do to solve this problem?
series data to Excel format.
My computer software configuration is:
- MS Windows 2000 5.00.2195 Service Pack 4
- Borland Delphi Enterprise 6.0 (Build 6.240) Update Pack 2
- TeeChart Pro 5.02
1. I have test program with following code:
-----------------------------------------------------
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, TeEngine, Series, ExtCtrls, TeeProcs, Chart, TeeEdit;
type
TForm1 = class(TForm)
Chart1: TChart;
Series1: TLineSeries;
Series2: TLineSeries;
Series3: TLineSeries;
MainMenu1: TMainMenu;
miChartEditor: TMenuItem;
ChartEditor1: TChartEditor;
procedure miChartEditorClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.miChartEditorClick(Sender: TObject);
begin
with ChartEditor1 do begin
Chart := self.Chart1; Execute;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
var
i: integer;
begin
with Chart1 do
for i := 0 to SeriesCount-1 do begin
Series.Title := Chr( Ord('A')+Ord(i) );
Series.FillSampleValues(3);
end;
end;
end.
-----------------------------------------------------
2. The results of series data export to XML format are:
-----------------------------------------------------
<?xml version="1.0" ?>
<chart>
<series title="A" type="Line">
<points count="3">
<point Y="570"/>
<point Y="497"/>
<point Y="508"/>
</points>
</series>
<series title="B" type="Line">
<points count="3">
<point Y="545"/>
<point Y="538"/>
<point Y="545"/>
</points>
</series>
<series title="C" type="Line">
<points count="3">
<point Y="518"/>
<point Y="517"/>
<point Y="524"/>
</points>
</series>
</chart>
-----------------------------------------------------
3. The results of series data export to Excel format and when
exported from Excel to text format are:
-----------------------------------------------------
Y Y Y
570 545 518
497 538 517
508 545 524
-----------------------------------------------------
So all column headers are "Y".
What can I do to solve this problem?