Chart has the function that shown above, when the corresponding export data in the implementation of the code is what? Directly,
CodePudding user response:
You use what version of the c + + Builder and TeeChart? The following code which can realize the current Series on the DBChart data export, but in different versions, the result may be slightly different,# include & lt; VCLTee. TeExport. Hpp>
#include
Void __fastcall TForm1: : Button1Click (TObject * Sender)
{
for (int i=0; I & lt; DBChart1 - & gt; SeriesCount (); I++)
{
If (DBChart1 - & gt; The Series [I] - & gt; The Active)
{
TSeriesDataXLS * sd=new TSeriesDataXLS (DBChart1 DBChart1 - & gt; The Series [I]);
Try
{
Sd - & gt; IncludeIndex=true;
Sd - & gt; IncludeHeader=true;
Sd - & gt; IncludeLabels=true;
Sd - & gt; SaveToFile (" D: \ \ ccrun \ \ chart XLS ");
}
__finally
{
Delete the sd;
}
}
}
}