Page 1 of 1

Meaningful export header?

Posted: Mon Oct 28, 2013 10:55 pm
by 15666411
When I export to a text file, I get useless headers. Instead of what I want, which looks like this:

TIME,MAIN.T3
0,293.15
50,293.15
100,293.15

I get this instead:

MAIN.T3,,
X,Y
0,293.15
50,293.15
100,293.15

What series properties do I set to change X to 'TIME' and Y to the series title?

I'm using C++/CLI.

Thanks,

Re: Meaningful export header?

Posted: Wed Oct 30, 2013 11:55 am
by 10050769
Hello MattG,

You must do the same I have made in next lines of code to export your series headers values:

Code: Select all

  series1.XValues.Name = "TIME";
      series1.YValues.Name = "MAIN.T3"; 
      tChart1.Draw();
      tChart1.Export.Data.Text.IncludeHeader = true;
      tChart1.Export.Data.Text.IncludeIndex = true; 
      tChart1.Export.Data.Text.IndexFieldName = series1.XValues.Name; 
Can you tell us if previous code works in your end?

Thanks,

Re: Meaningful export header?

Posted: Wed Oct 30, 2013 11:50 pm
by 15666411
Excellent. That worked. I used the following in C++/CLI:

Code: Select all

Steema::TeeChart::Styles::Line ^line = gcnew Steema::TeeChart::Styles::Line();
line->XValues->Name = "TIME";
line->YValues->Name = seriesName;
...
tChart1->Series->Add(line);
...
SteemaDe = gcnew Export::DataExport(tChart1->Chart);
SteemaDe->Text->IncludeHeader = true;         // Series->XValues->Name and YValues->Name
SteemaDe->Text->IncludeSeriesTitle = false;   // Series name above header -> don't need it
...
SteemaDe->Text->CopyToClipboard();
Thank you Sandra!

Matt